Pārlūkot izejas kodu

Merge pull request #46 from CaiJingLong/fix-text-color-not-true

fix text color not true in title.
Caijinglong 5 gadus atpakaļ
vecāks
revīzija
34fe57735c
No account linked to committer's email address

+ 5
- 2
example/lib/main.dart Parādīt failu

@@ -117,6 +117,9 @@ class _MyHomePageState extends State<MyHomePage> with LoadingDelegate {
117 117
       /// The following are optional parameters.
118 118
       themeColor: Colors.green,
119 119
       // the title color and bottom color
120
+
121
+      textColor: Colors.white,
122
+      // text color
120 123
       padding: 1.0,
121 124
       // item padding
122 125
       dividerColor: Colors.grey,
@@ -132,8 +135,7 @@ class _MyHomePageState extends State<MyHomePage> with LoadingDelegate {
132 135
       // i18n provider ,default is chinese. , you can custom I18nProvider or use ENProvider()
133 136
       rowCount: 3,
134 137
       // item row count
135
-      textColor: Colors.white,
136
-      // text color
138
+
137 139
       thumbSize: 150,
138 140
       // preview thumb size , default is 64
139 141
       sortDelegate: SortDelegate.common,
@@ -141,6 +143,7 @@ class _MyHomePageState extends State<MyHomePage> with LoadingDelegate {
141 143
       checkBoxBuilderDelegate: DefaultCheckBoxBuilderDelegate(
142 144
         activeColor: Colors.white,
143 145
         unselectedColor: Colors.white,
146
+        checkColor: Colors.green,
144 147
       ),
145 148
       // default is DefaultCheckBoxBuilderDelegate ,or you make custom delegate to create checkbox
146 149
 

+ 1
- 1
example/lib/preview.dart Parādīt failu

@@ -12,7 +12,7 @@ class PreviewPage extends StatelessWidget {
12 12
   Widget build(BuildContext context) {
13 13
     return Scaffold(
14 14
       appBar: AppBar(
15
-        title: Text("预览"),
15
+        title: Text("Preview"),
16 16
       ),
17 17
       body: ListView(
18 18
         children: list

+ 3
- 1
lib/src/delegate/checkbox_builder_delegate.dart Parādīt failu

@@ -16,10 +16,12 @@ abstract class CheckBoxBuilderDelegate {
16 16
 class DefaultCheckBoxBuilderDelegate extends CheckBoxBuilderDelegate {
17 17
   Color activeColor;
18 18
   Color unselectedColor;
19
+  Color checkColor;
19 20
 
20 21
   DefaultCheckBoxBuilderDelegate({
21 22
     this.activeColor = Colors.white,
22 23
     this.unselectedColor = Colors.white,
24
+    this.checkColor = Colors.black,
23 25
   });
24 26
 
25 27
   @override
@@ -36,7 +38,7 @@ class DefaultCheckBoxBuilderDelegate extends CheckBoxBuilderDelegate {
36 38
         value: checked,
37 39
         onChanged: (bool check) {},
38 40
         activeColor: activeColor,
39
-        checkColor: Colors.red,
41
+        checkColor: checkColor,
40 42
         title: Text(
41 43
           i18nProvider.getSelectedOptionsText(options),
42 44
           textAlign: TextAlign.end,

+ 7
- 1
lib/src/ui/page/photo_main_page.dart Parādīt failu

@@ -108,11 +108,17 @@ class _PhotoMainPageState extends State<PhotoMainPage>
108 108
         child: Scaffold(
109 109
           appBar: AppBar(
110 110
             leading: IconButton(
111
-              icon: Icon(Icons.close),
111
+              icon: Icon(
112
+                Icons.close,
113
+                color: options.textColor,
114
+              ),
112 115
               onPressed: _cancel,
113 116
             ),
114 117
             title: Text(
115 118
               i18nProvider.getTitleText(options),
119
+              style: TextStyle(
120
+                color: options.textColor,
121
+              ),
116 122
             ),
117 123
             actions: <Widget>[
118 124
               FlatButton(

+ 10
- 1
lib/src/ui/page/photo_preview_page.dart Parādīt failu

@@ -96,20 +96,29 @@ class _PhotoPreviewPageState extends State<PhotoPreviewPage> {
96 96
 
97 97
   @override
98 98
   Widget build(BuildContext context) {
99
+    var data = Theme.of(context);
99 100
     var textStyle = TextStyle(
100 101
       color: options.textColor,
101 102
       fontSize: 14.0,
102 103
     );
103 104
     return Theme(
104
-      data: Theme.of(context).copyWith(primaryColor: options.themeColor),
105
+      data: data.copyWith(
106
+        primaryColor: options.themeColor,
107
+      ),
105 108
       child: Scaffold(
106 109
         appBar: AppBar(
107 110
           backgroundColor: config.options.themeColor,
111
+          leading: BackButton(
112
+            color: options.textColor,
113
+          ),
108 114
           title: StreamBuilder(
109 115
             stream: pageStream,
110 116
             initialData: widget.initIndex,
111 117
             builder: (ctx, snap) => Text(
112 118
                   "${snap.data + 1}/${widget.list.length}",
119
+                  style: TextStyle(
120
+                    color: options.textColor,
121
+                  ),
113 122
                 ),
114 123
           ),
115 124
           actions: <Widget>[

+ 6
- 6
pubspec.lock Parādīt failu

@@ -7,7 +7,7 @@ packages:
7 7
       name: async
8 8
       url: "https://pub.flutter-io.cn"
9 9
     source: hosted
10
-    version: "2.2.0"
10
+    version: "2.1.0"
11 11
   boolean_selector:
12 12
     dependency: transitive
13 13
     description:
@@ -70,9 +70,9 @@ packages:
70 70
   photo_manager:
71 71
     dependency: "direct main"
72 72
     description:
73
-      path: "../flutter_photo_manager"
74
-      relative: true
75
-    source: path
73
+      name: photo_manager
74
+      url: "https://pub.flutter-io.cn"
75
+    source: hosted
76 76
     version: "0.3.4"
77 77
   quiver:
78 78
     dependency: transitive
@@ -80,7 +80,7 @@ packages:
80 80
       name: quiver
81 81
       url: "https://pub.flutter-io.cn"
82 82
     source: hosted
83
-    version: "2.0.3"
83
+    version: "2.0.2"
84 84
   sky_engine:
85 85
     dependency: transitive
86 86
     description: flutter
@@ -127,7 +127,7 @@ packages:
127 127
       name: test_api
128 128
       url: "https://pub.flutter-io.cn"
129 129
     source: hosted
130
-    version: "0.2.5"
130
+    version: "0.2.4"
131 131
   typed_data:
132 132
     dependency: transitive
133 133
     description: