@@ -414,7 +414,10 @@ abstract class AssetPickerBuilderDelegate<Asset, Path> {
414414 gradient: LinearGradient (
415415 begin: AlignmentDirectional .bottomCenter,
416416 end: AlignmentDirectional .topCenter,
417- colors: < Color > [theme.dividerColor, Colors .transparent],
417+ colors: < Color > [
418+ theme.canvasColor.withAlpha (128 ),
419+ Colors .transparent,
420+ ],
418421 ),
419422 ),
420423 child: Container (
@@ -428,11 +431,9 @@ abstract class AssetPickerBuilderDelegate<Asset, Path> {
428431 child: ScaleText (
429432 textDelegate.gifIndicator,
430433 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,
436437 ),
437438 semanticsLabel: semanticsTextDelegate.gifIndicator,
438439 strutStyle: const StrutStyle (forceStrutHeight: true , height: 1 ),
@@ -1503,6 +1504,7 @@ class DefaultAssetPickerBuilderDelegate
15031504 enabled: ! isBanned,
15041505 excludeSemantics: true ,
15051506 focusable: ! isSwitchingPath,
1507+ identifier: asset.id,
15061508 label: '${semanticsTextDelegate .semanticTypeLabel (asset .type )}'
15071509 '${semanticIndex (index )}, '
15081510 '${asset .createDateTime .toString ().replaceAll ('.000' , '' )}' ,
@@ -1718,12 +1720,6 @@ class DefaultAssetPickerBuilderDelegate
17181720 isOriginal: false ,
17191721 thumbnailSize: gridThumbnailSize,
17201722 );
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- }
17271723 return Stack (
17281724 fit: StackFit .expand,
17291725 children: < Widget > [
@@ -1733,8 +1729,16 @@ class DefaultAssetPickerBuilderDelegate
17331729 failedItemBuilder: failedItemBuilder,
17341730 ),
17351731 ),
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+ ),
17381742 if (asset.type == AssetType .video) // 如果为视频则显示标识
17391743 videoIndicator (context, asset),
17401744 if (asset.isLivePhoto) buildLivePhotoIndicator (context, asset),
0 commit comments