@@ -150,8 +150,9 @@ abstract class AssetPickerBuilderDelegate<A, P> {
150
150
/// GIF image type indicator.
151
151
/// GIF类型图片指示
152
152
Widget gifIndicator (BuildContext context, A asset) {
153
- return Align (
154
- alignment: AlignmentDirectional .bottomStart,
153
+ return PositionedDirectional (
154
+ start: 0 ,
155
+ bottom: 0 ,
155
156
child: Container (
156
157
width: double .maxFinite,
157
158
height: 26.0 ,
@@ -801,6 +802,7 @@ class DefaultAssetPickerBuilderDelegate
801
802
}
802
803
final AssetEntity asset = provider.currentAssets.elementAt (index);
803
804
loader = Stack (
805
+ fit: StackFit .expand,
804
806
children: < Widget > [
805
807
Positioned .fill (
806
808
child: RepaintBoundary (child: state.completedWidget),
@@ -1244,36 +1246,39 @@ class DefaultAssetPickerBuilderDelegate
1244
1246
/// 将指示器的图标和文字设置为 [Colors.white] 。
1245
1247
@override
1246
1248
Widget videoIndicator (BuildContext context, AssetEntity asset) {
1247
- return Container (
1248
- width: double .maxFinite,
1249
- height: 26.0 ,
1250
- alignment: AlignmentDirectional .bottomStart,
1251
- padding: const EdgeInsets .symmetric (horizontal: 2.0 , vertical: 2.0 ),
1252
- decoration: BoxDecoration (
1253
- gradient: LinearGradient (
1254
- begin: AlignmentDirectional .bottomCenter,
1255
- end: AlignmentDirectional .topCenter,
1256
- colors: < Color > [theme.dividerColor, Colors .transparent],
1249
+ return PositionedDirectional (
1250
+ start: 0 ,
1251
+ bottom: 0 ,
1252
+ child: Container (
1253
+ width: double .maxFinite,
1254
+ height: 26.0 ,
1255
+ padding: const EdgeInsets .symmetric (horizontal: 2.0 , vertical: 2.0 ),
1256
+ decoration: BoxDecoration (
1257
+ gradient: LinearGradient (
1258
+ begin: AlignmentDirectional .bottomCenter,
1259
+ end: AlignmentDirectional .topCenter,
1260
+ colors: < Color > [theme.dividerColor, Colors .transparent],
1261
+ ),
1257
1262
),
1258
- ),
1259
- child : Row (
1260
- crossAxisAlignment : CrossAxisAlignment .center,
1261
- children : < Widget > [
1262
- const Icon ( Icons .videocam, size : 24.0 , color : Colors .white),
1263
- Padding (
1264
- padding : const EdgeInsets . only (left : 4.0 ),
1265
- child : Text (
1266
- Constants .textDelegate. durationIndicatorBuilder (
1267
- Duration (seconds : asset.duration ),
1268
- ),
1269
- style : const TextStyle (color : Colors .white, fontSize : 16.0 ),
1270
- strutStyle : const StrutStyle (
1271
- forceStrutHeight : true ,
1272
- height : 1.4 ,
1263
+ child : Row (
1264
+ crossAxisAlignment : CrossAxisAlignment .center,
1265
+ children : < Widget > [
1266
+ const Icon ( Icons .videocam, size : 24.0 , color : Colors .white),
1267
+ Padding (
1268
+ padding : const EdgeInsets . only (left : 4.0 ),
1269
+ child : Text (
1270
+ Constants .textDelegate. durationIndicatorBuilder (
1271
+ Duration (seconds : asset.duration),
1272
+ ),
1273
+ style : const TextStyle (color : Colors .white, fontSize : 16.0 ),
1274
+ strutStyle : const StrutStyle (
1275
+ forceStrutHeight : true ,
1276
+ height : 1.4 ,
1277
+ ) ,
1273
1278
),
1274
1279
),
1275
- ) ,
1276
- ] ,
1280
+ ] ,
1281
+ ) ,
1277
1282
),
1278
1283
);
1279
1284
}
0 commit comments