Bläddra i källkod

preview sure button bug

preview bottom safeArea
readme
cjl_macbook 6 år sedan
förälder
incheckning
905c46c31c
5 ändrade filer med 60 tillägg och 19 borttagningar
  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 Visa fil

@@ -1,3 +1,7 @@
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 Visa fil

@@ -45,4 +45,34 @@ void _pickImage() async{
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 Visa fil

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

+ 17
- 12
lib/src/ui/page/photo_preview_page.dart Visa fil

@@ -113,17 +113,18 @@ class _PhotoPreviewPageState extends State<PhotoPreviewPage> {
113 113
                 ),
114 114
           ),
115 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 122
                       config.provider.getSureText(options, selectedList.length),
121 123
                       style: selectedList.length == 0
122 124
                           ? textStyle.copyWith(color: options.disableColor)
123 125
                           : textStyle,
124 126
                     ),
125 127
               ),
126
-              onPressed: selectedList.length == 0 ? null : sure,
127 128
             ),
128 129
           ],
129 130
         ),
@@ -141,15 +142,19 @@ class _PhotoPreviewPageState extends State<PhotoPreviewPage> {
141 142
 
142 143
   Widget _buildBottom() {
143 144
     return Container(
144
-      height: 52.0,
145 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 Visa fil

@@ -1,6 +1,6 @@
1 1
 name: photo
2 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 4
 author: caijinglong
5 5
 homepage: https://github.com/CaiJingLong/flutter_photo
6 6