@@ -551,15 +551,14 @@ class DefaultAssetPickerViewerBuilderDelegate
551
551
themeData.bottomAppBarTheme.color! .opacity *
552
552
(isAppleOS (context) ? .9 : 1 ),
553
553
);
554
- return ValueListenableBuilder2 <bool , int >(
555
- firstNotifier: isDisplayingDetail,
556
- secondNotifier: selectedNotifier,
557
- builder: (_, bool v, __, Widget ? child) => AnimatedPositionedDirectional (
554
+ return ValueListenableBuilder (
555
+ valueListenable: isDisplayingDetail,
556
+ builder: (_, v, child) => AnimatedPositionedDirectional (
558
557
duration: kThemeAnimationDuration,
559
558
curve: Curves .easeInOut,
560
- bottom: v ? 0 : - (context.bottomPadding + bottomDetailHeight),
561
- start: 0 ,
562
- end: 0 ,
559
+ bottom: v ? 0.0 : - (context.bottomPadding + bottomDetailHeight),
560
+ start: 0.0 ,
561
+ end: 0.0 ,
563
562
height: context.bottomPadding + bottomDetailHeight,
564
563
child: child! ,
565
564
),
@@ -717,7 +716,7 @@ class DefaultAssetPickerViewerBuilderDelegate
717
716
/// AppBar widget.
718
717
/// 顶栏部件
719
718
Widget appBar (BuildContext context) {
720
- return AssetPickerAppBar (
719
+ final bar = AssetPickerAppBar (
721
720
leading: Semantics (
722
721
sortKey: ordinalSortKey (0 ),
723
722
child: IconButton (
@@ -757,6 +756,18 @@ class DefaultAssetPickerViewerBuilderDelegate
757
756
const SizedBox (width: 14 ),
758
757
],
759
758
);
759
+ return ValueListenableBuilder (
760
+ valueListenable: isDisplayingDetail,
761
+ builder: (_, v, child) => AnimatedPositionedDirectional (
762
+ duration: kThemeAnimationDuration,
763
+ curve: Curves .easeInOut,
764
+ top: v ? 0.0 : - (context.topPadding + bar.preferredSize.height),
765
+ start: 0.0 ,
766
+ end: 0.0 ,
767
+ child: child! ,
768
+ ),
769
+ child: bar,
770
+ );
760
771
}
761
772
762
773
/// It'll pop with [AssetPickerProvider.selectedAssets] when there are
0 commit comments