ソースを参照

preview sure button bug

preview bottom safeArea
readme
cjl_macbook 6 年 前
コミット
905c46c31c
共有5 個のファイルを変更した60 個の追加19 個の削除を含む
  1. 6
    2
      CHANGELOG.md
  2. 31
    1
      README.md
  3. 5
    3
      lib/src/ui/page/photo_main_page.dart
  4. 17
    12
      lib/src/ui/page/photo_preview_page.dart
  5. 1
    1
      pubspec.yaml

+ 6
- 2
CHANGELOG.md ファイルの表示

1
-## [0.0.1] - TODO: Add release date.
1
+## [0.0.2] fix bug
2
+preview sure button bug
3
+preview bottom safeArea
2
 
4
 
3
-* TODO: Describe initial release.
5
+## [0.0.1] first version
6
+
7
+image picker

+ 31
- 1
README.md ファイルの表示

45
     });
45
     });
46
   }
46
   }
47
 
47
 
48
-```
48
+```
49
+
50
+
51
+## about android
52
+
53
+### glide
54
+
55
+android use glide to create image thumb, version is 4.8.0
56
+
57
+if you other android library use the library, and version is not same, then you need edit your android project's build.gradle
58
+
59
+```gradle
60
+rootProject.allprojects {
61
+
62
+    subprojects {
63
+        project.configurations.all {
64
+            resolutionStrategy.eachDependency { details ->
65
+                if (details.requested.group == 'com.github.bumptech.glide'
66
+                        && details.requested.name.contains('glide')) {
67
+                    details.useVersion "4.8.0"
68
+                }
69
+            }
70
+        }
71
+    }
72
+
73
+}
74
+```
75
+
76
+if you use the proguard
77
+
78
+see the [github](https://github.com/bumptech/glide#proguard)

+ 5
- 3
lib/src/ui/page/photo_main_page.dart ファイルの表示

86
             ),
86
             ),
87
             actions: <Widget>[
87
             actions: <Widget>[
88
               FlatButton(
88
               FlatButton(
89
+                splashColor: Colors.transparent,
89
                 child: Text(
90
                 child: Text(
90
                   i18nProvider.getSureText(options, selectedCount),
91
                   i18nProvider.getSureText(options, selectedCount),
91
                   style: selectedCount == 0
92
                   style: selectedCount == 0
388
           height: 52.0,
389
           height: 52.0,
389
           child: Row(
390
           child: Row(
390
             children: <Widget>[
391
             children: <Widget>[
391
-              GestureDetector(
392
-                behavior: HitTestBehavior.translucent,
393
-                onTap: _showGallerySelectDialog,
392
+              FlatButton(
393
+                onPressed: _showGallerySelectDialog,
394
+                splashColor: Colors.transparent,
394
                 child: Container(
395
                 child: Container(
395
                   alignment: Alignment.center,
396
                   alignment: Alignment.center,
396
                   height: 44.0,
397
                   height: 44.0,
407
               FlatButton(
408
               FlatButton(
408
                 onPressed: widget.onTapPreview,
409
                 onPressed: widget.onTapPreview,
409
                 textColor: options.textColor,
410
                 textColor: options.textColor,
411
+                splashColor: Colors.transparent,
410
                 disabledTextColor: options.disableColor,
412
                 disabledTextColor: options.disableColor,
411
                 child: Container(
413
                 child: Container(
412
                   height: 44.0,
414
                   height: 44.0,

+ 17
- 12
lib/src/ui/page/photo_preview_page.dart ファイルの表示

113
                 ),
113
                 ),
114
           ),
114
           ),
115
           actions: <Widget>[
115
           actions: <Widget>[
116
-            FlatButton(
117
-              child: StreamBuilder(
118
-                stream: pageStream,
119
-                builder: (ctx, s) => Text(
116
+            StreamBuilder(
117
+              stream: pageStream,
118
+              builder: (ctx, s) => FlatButton(
119
+                splashColor: Colors.transparent,
120
+                onPressed: selectedList.length == 0 ? null : sure,
121
+                child: Text(
120
                       config.provider.getSureText(options, selectedList.length),
122
                       config.provider.getSureText(options, selectedList.length),
121
                       style: selectedList.length == 0
123
                       style: selectedList.length == 0
122
                           ? textStyle.copyWith(color: options.disableColor)
124
                           ? textStyle.copyWith(color: options.disableColor)
123
                           : textStyle,
125
                           : textStyle,
124
                     ),
126
                     ),
125
               ),
127
               ),
126
-              onPressed: selectedList.length == 0 ? null : sure,
127
             ),
128
             ),
128
           ],
129
           ],
129
         ),
130
         ),
141
 
142
 
142
   Widget _buildBottom() {
143
   Widget _buildBottom() {
143
     return Container(
144
     return Container(
144
-      height: 52.0,
145
       color: themeColor,
145
       color: themeColor,
146
-      child: Row(
147
-        children: <Widget>[
148
-          Expanded(
149
-            child: Container(),
146
+      child: SafeArea(
147
+        child: Container(
148
+          height: 52.0,
149
+          child: Row(
150
+            children: <Widget>[
151
+              Expanded(
152
+                child: Container(),
153
+              ),
154
+              _buildCheckbox(),
155
+            ],
150
           ),
156
           ),
151
-          _buildCheckbox(),
152
-        ],
157
+        ),
153
       ),
158
       ),
154
     );
159
     );
155
   }
160
   }

+ 1
- 1
pubspec.yaml ファイルの表示

1
 name: photo
1
 name: photo
2
 description: image picker, multi picker,use flutter as ui, if you want to build custom ui,you just use photo_manager.
2
 description: image picker, multi picker,use flutter as ui, if you want to build custom ui,you just use photo_manager.
3
-version: 0.0.1
3
+version: 0.0.2
4
 author: caijinglong
4
 author: caijinglong
5
 homepage: https://github.com/CaiJingLong/flutter_photo
5
 homepage: https://github.com/CaiJingLong/flutter_photo
6
 
6