@@ -414,7 +414,10 @@ abstract class AssetPickerBuilderDelegate<Asset, Path> {
414
414
gradient: LinearGradient (
415
415
begin: AlignmentDirectional .bottomCenter,
416
416
end: AlignmentDirectional .topCenter,
417
- colors: < Color > [theme.dividerColor, Colors .transparent],
417
+ colors: < Color > [
418
+ theme.canvasColor.withAlpha (128 ),
419
+ Colors .transparent,
420
+ ],
418
421
),
419
422
),
420
423
child: Container (
@@ -428,11 +431,9 @@ abstract class AssetPickerBuilderDelegate<Asset, Path> {
428
431
child: ScaleText (
429
432
textDelegate.gifIndicator,
430
433
style: TextStyle (
431
- color: isAppleOS (context)
432
- ? theme.textTheme.bodyMedium? .color
433
- : theme.primaryColor,
434
- fontSize: 13 ,
435
- fontWeight: FontWeight .w500,
434
+ color: theme.textTheme.bodyMedium? .color,
435
+ fontSize: 12 ,
436
+ fontWeight: FontWeight .bold,
436
437
),
437
438
semanticsLabel: semanticsTextDelegate.gifIndicator,
438
439
strutStyle: const StrutStyle (forceStrutHeight: true , height: 1 ),
@@ -1503,6 +1504,7 @@ class DefaultAssetPickerBuilderDelegate
1503
1504
enabled: ! isBanned,
1504
1505
excludeSemantics: true ,
1505
1506
focusable: ! isSwitchingPath,
1507
+ identifier: asset.id,
1506
1508
label: '${semanticsTextDelegate .semanticTypeLabel (asset .type )}'
1507
1509
'${semanticIndex (index )}, '
1508
1510
'${asset .createDateTime .toString ().replaceAll ('.000' , '' )}' ,
@@ -1718,12 +1720,6 @@ class DefaultAssetPickerBuilderDelegate
1718
1720
isOriginal: false ,
1719
1721
thumbnailSize: gridThumbnailSize,
1720
1722
);
1721
- SpecialImageType ? type;
1722
- if (imageProvider.imageFileType == ImageFileType .gif) {
1723
- type = SpecialImageType .gif;
1724
- } else if (imageProvider.imageFileType == ImageFileType .heic) {
1725
- type = SpecialImageType .heic;
1726
- }
1727
1723
return Stack (
1728
1724
fit: StackFit .expand,
1729
1725
children: < Widget > [
@@ -1733,8 +1729,16 @@ class DefaultAssetPickerBuilderDelegate
1733
1729
failedItemBuilder: failedItemBuilder,
1734
1730
),
1735
1731
),
1736
- if (type == SpecialImageType .gif) // 如果为GIF则显示标识
1737
- gifIndicator (context, asset),
1732
+ FutureBuilder (
1733
+ future: imageProvider.imageFileType,
1734
+ builder: (context, snapshot) {
1735
+ if (snapshot.data case final type?
1736
+ when type == ImageFileType .gif) {
1737
+ return gifIndicator (context, asset);
1738
+ }
1739
+ return const SizedBox .shrink ();
1740
+ },
1741
+ ),
1738
1742
if (asset.type == AssetType .video) // 如果为视频则显示标识
1739
1743
videoIndicator (context, asset),
1740
1744
if (asset.isLivePhoto) buildLivePhotoIndicator (context, asset),
0 commit comments