File tree Expand file tree Collapse file tree 1 file changed +11
-13
lines changed Expand file tree Collapse file tree 1 file changed +11
-13
lines changed Original file line number Diff line number Diff line change @@ -122,15 +122,16 @@ class PickMethod {
122
122
context,
123
123
enableRecording: true ,
124
124
);
125
- if (result != null ) {
126
- final AssetPicker <AssetEntity , AssetPathEntity > picker =
127
- context.findAncestorWidgetOfExactType ()! ;
128
- final DefaultAssetPickerProvider p =
129
- picker.builder.provider as DefaultAssetPickerProvider ;
130
- await p.currentPathEntity! .refreshPathProperties ();
131
- await p.switchPath (p.currentPathEntity! );
132
- p.selectAsset (result);
125
+ if (result == null ) {
126
+ return ;
133
127
}
128
+ final AssetPicker <AssetEntity , AssetPathEntity > picker =
129
+ context.findAncestorWidgetOfExactType ()! ;
130
+ final DefaultAssetPickerProvider p =
131
+ picker.builder.provider as DefaultAssetPickerProvider ;
132
+ await p.currentPathEntity! .refreshPathProperties ();
133
+ await p.switchPath (p.currentPathEntity! );
134
+ p.selectAsset (result);
134
135
},
135
136
child: const Center (
136
137
child: Icon (Icons .camera_enhance, size: 42.0 ),
@@ -298,11 +299,8 @@ class PickMethod {
298
299
selectedAssets: assets,
299
300
selectPredicate: (BuildContext c, AssetEntity a, bool isSelected) {
300
301
print ('Asset title: ${a .title }' );
301
- if (a.title? .endsWith ('.gif' ) == true ) {
302
- return false ;
303
- }
304
- return true ;
305
- }
302
+ return a.title? .endsWith ('.gif' ) != true ;
303
+ },
306
304
);
307
305
},
308
306
);
You can’t perform that action at this time.
0 commit comments