@@ -155,6 +155,7 @@ abstract class AssetPickerBuilderDelegate<A, P> {
155
155
Widget gifIndicator (BuildContext context, A asset) {
156
156
return PositionedDirectional (
157
157
start: 0 ,
158
+ end: 0 ,
158
159
bottom: 0 ,
159
160
child: Container (
160
161
padding: const EdgeInsets .all (6.0 ),
@@ -260,7 +261,7 @@ abstract class AssetPickerBuilderDelegate<A, P> {
260
261
builder: (_, List <A > currentAssets, __) => GridView .builder (
261
262
controller: gridScrollController,
262
263
padding: isAppleOS
263
- ? EdgeInsets .only (
264
+ ? EdgeInsetsDirectional .only (
264
265
top: Screens .topSafeHeight + kToolbarHeight,
265
266
bottom: bottomActionBarHeight,
266
267
)
@@ -319,9 +320,9 @@ abstract class AssetPickerBuilderDelegate<A, P> {
319
320
Widget child = Container (
320
321
width: Screens .width,
321
322
height: bottomActionBarHeight + Screens .bottomSafeHeight,
322
- padding: EdgeInsets .only (
323
- left : 20.0 ,
324
- right : 20.0 ,
323
+ padding: EdgeInsetsDirectional .only (
324
+ start : 20.0 ,
325
+ end : 20.0 ,
325
326
bottom: Screens .bottomSafeHeight,
326
327
),
327
328
color: theme.primaryColor.withOpacity (isAppleOS ? 0.90 : 1.0 ),
@@ -550,7 +551,7 @@ class DefaultAssetPickerBuilderDelegate
550
551
(isPreviewEnabled || ! isSingleAssetMode)
551
552
? < Widget > [confirmButton (context)]
552
553
: null ,
553
- actionsPadding: const EdgeInsets .only (right : 14.0 ),
554
+ actionsPadding: const EdgeInsetsDirectional .only (end : 14.0 ),
554
555
blurRadius: isAppleOS ? appleOSBlurRadius : 0.0 ,
555
556
);
556
557
}
@@ -727,7 +728,7 @@ class DefaultAssetPickerBuilderDelegate
727
728
),
728
729
),
729
730
child: Padding (
730
- padding: const EdgeInsets .only (left : 4.0 ),
731
+ padding: const EdgeInsetsDirectional .only (start : 4.0 ),
731
732
child: Text (
732
733
Constants .textDelegate.durationIndicatorBuilder (
733
734
Duration (seconds: asset.duration),
@@ -754,7 +755,7 @@ class DefaultAssetPickerBuilderDelegate
754
755
),
755
756
),
756
757
child: Padding (
757
- padding: const EdgeInsets .only (left : 4.0 , right : 30.0 ),
758
+ padding: const EdgeInsetsDirectional .only (start : 4.0 , end : 30.0 ),
758
759
child: Text (
759
760
asset.title ?? '' ,
760
761
style: const TextStyle (fontSize: 16.0 ),
@@ -788,7 +789,7 @@ class DefaultAssetPickerBuilderDelegate
788
789
child: Text (
789
790
provider.isSelectedNotEmpty && ! isSingleAssetMode
790
791
? '${Constants .textDelegate .confirm }'
791
- '(${provider .selectedAssets .length }/${provider .maxAssets })'
792
+ ' (${provider .selectedAssets .length }/${provider .maxAssets })'
792
793
: Constants .textDelegate.confirm,
793
794
style: TextStyle (
794
795
color: provider.isSelectedNotEmpty
@@ -918,7 +919,8 @@ class DefaultAssetPickerBuilderDelegate
918
919
RequestType .audio;
919
920
return Selector <DefaultAssetPickerProvider , bool >(
920
921
selector: (_, DefaultAssetPickerProvider p) => p.isSwitchingPath,
921
- builder: (_, bool isSwitchingPath, Widget ? w) => AnimatedPositioned (
922
+ builder: (_, bool isSwitchingPath, Widget ? w) =>
923
+ AnimatedPositionedDirectional (
922
924
duration: switchingPathDuration,
923
925
curve: switchingPathCurve,
924
926
top: isAppleOS
@@ -949,7 +951,7 @@ class DefaultAssetPickerBuilderDelegate
949
951
final Map <AssetPathEntity , Uint8List ?> list =
950
952
c.watch <DefaultAssetPickerProvider >().pathEntityList;
951
953
return ListView .separated (
952
- padding: const EdgeInsets .only (top: 1.0 ),
954
+ padding: const EdgeInsetsDirectional .only (top: 1.0 ),
953
955
itemCount: list.length,
954
956
itemBuilder: (_, int index) => pathEntityWidget (
955
957
context: c,
@@ -958,7 +960,7 @@ class DefaultAssetPickerBuilderDelegate
958
960
isAudio: isAudio,
959
961
),
960
962
separatorBuilder: (BuildContext _, int __) => Container (
961
- margin: const EdgeInsets .only (left : 60.0 ),
963
+ margin: const EdgeInsetsDirectional .only (start : 60.0 ),
962
964
height: 1.0 ,
963
965
color: theme.canvasColor,
964
966
),
@@ -976,7 +978,7 @@ class DefaultAssetPickerBuilderDelegate
976
978
child: Container (
977
979
height: appBarItemHeight,
978
980
constraints: BoxConstraints (maxWidth: Screens .width * 0.5 ),
979
- padding: const EdgeInsets .only (left : 12.0 , right : 6.0 ),
981
+ padding: const EdgeInsetsDirectional .only (start : 12.0 , end : 6.0 ),
980
982
decoration: BoxDecoration (
981
983
borderRadius: BorderRadius .circular (999 ),
982
984
color: theme.dividerColor,
@@ -1002,7 +1004,7 @@ class DefaultAssetPickerBuilderDelegate
1002
1004
],
1003
1005
),
1004
1006
child: Padding (
1005
- padding: const EdgeInsets .only (left : 5.0 ),
1007
+ padding: const EdgeInsetsDirectional .only (start : 5.0 ),
1006
1008
child: DecoratedBox (
1007
1009
decoration: BoxDecoration (
1008
1010
shape: BoxShape .circle,
@@ -1081,12 +1083,15 @@ class DefaultAssetPickerBuilderDelegate
1081
1083
),
1082
1084
Expanded (
1083
1085
child: Padding (
1084
- padding: const EdgeInsets .only (left: 15.0 , right: 20.0 ),
1086
+ padding: const EdgeInsetsDirectional .only (
1087
+ start: 15.0 ,
1088
+ end: 20.0 ,
1089
+ ),
1085
1090
child: Row (
1086
1091
children: < Widget > [
1087
1092
Flexible (
1088
1093
child: Padding (
1089
- padding: const EdgeInsets .only (right : 10.0 ),
1094
+ padding: const EdgeInsetsDirectional .only (end : 10.0 ),
1090
1095
child: Text (
1091
1096
pathEntity.name,
1092
1097
style: const TextStyle (fontSize: 18.0 ),
@@ -1170,7 +1175,7 @@ class DefaultAssetPickerBuilderDelegate
1170
1175
child: Text (
1171
1176
isSelectedNotEmpty
1172
1177
? '${Constants .textDelegate .preview }'
1173
- '(${provider .selectedAssets .length })'
1178
+ ' (${provider .selectedAssets .length })'
1174
1179
: Constants .textDelegate.preview,
1175
1180
style: TextStyle (
1176
1181
color: isSelectedNotEmpty
@@ -1255,7 +1260,11 @@ class DefaultAssetPickerBuilderDelegate
1255
1260
),
1256
1261
);
1257
1262
if (isPreviewEnabled) {
1258
- return Positioned (top: 0.0 , right: 0.0 , child: selectorWidget);
1263
+ return PositionedDirectional (
1264
+ top: 0.0 ,
1265
+ end: 0.0 ,
1266
+ child: selectorWidget,
1267
+ );
1259
1268
}
1260
1269
return selectorWidget;
1261
1270
},
@@ -1337,6 +1346,7 @@ class DefaultAssetPickerBuilderDelegate
1337
1346
Widget videoIndicator (BuildContext context, AssetEntity asset) {
1338
1347
return PositionedDirectional (
1339
1348
start: 0 ,
1349
+ end: 0 ,
1340
1350
bottom: 0 ,
1341
1351
child: Container (
1342
1352
width: double .maxFinite,
@@ -1353,16 +1363,19 @@ class DefaultAssetPickerBuilderDelegate
1353
1363
crossAxisAlignment: CrossAxisAlignment .center,
1354
1364
children: < Widget > [
1355
1365
const Icon (Icons .videocam, size: 24.0 , color: Colors .white),
1356
- Padding (
1357
- padding: const EdgeInsets .only (left: 4.0 ),
1358
- child: Text (
1359
- Constants .textDelegate.durationIndicatorBuilder (
1360
- Duration (seconds: asset.duration),
1361
- ),
1362
- style: const TextStyle (color: Colors .white, fontSize: 16.0 ),
1363
- strutStyle: const StrutStyle (
1364
- forceStrutHeight: true ,
1365
- height: 1.4 ,
1366
+ Expanded (
1367
+ child: Padding (
1368
+ padding: const EdgeInsetsDirectional .only (start: 4.0 ),
1369
+ child: Text (
1370
+ Constants .textDelegate.durationIndicatorBuilder (
1371
+ Duration (seconds: asset.duration),
1372
+ ),
1373
+ style: const TextStyle (color: Colors .white, fontSize: 16.0 ),
1374
+ strutStyle: const StrutStyle (
1375
+ forceStrutHeight: true ,
1376
+ height: 1.4 ,
1377
+ ),
1378
+ maxLines: 1 ,
1366
1379
),
1367
1380
),
1368
1381
),
0 commit comments