Skip to content

Commit 3910c9c

Browse files
committed
💄 Sync preview color schemes
1 parent f20c8c5 commit 3910c9c

File tree

1 file changed

+22
-17
lines changed

1 file changed

+22
-17
lines changed

lib/src/delegates/asset_picker_viewer_builder_delegate.dart

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ class DefaultAssetPickerViewerBuilderDelegate
401401

402402
@override
403403
Widget bottomDetailBuilder(BuildContext context) {
404-
final Color _backgroundColor = themeData.canvasColor.withOpacity(0.85);
404+
final Color _backgroundColor = themeData.primaryColor.withOpacity(.9);
405405
return ValueListenableBuilder2<bool, int>(
406406
firstNotifier: isDisplayingDetail,
407407
secondNotifier: selectedNotifier,
@@ -445,7 +445,7 @@ class DefaultAssetPickerViewerBuilderDelegate
445445
border: Border(
446446
top: BorderSide(
447447
width: 1.0,
448-
color: themeData.dividerColor,
448+
color: themeData.canvasColor,
449449
),
450450
),
451451
color: _backgroundColor,
@@ -554,32 +554,37 @@ class DefaultAssetPickerViewerBuilderDelegate
554554
child: child!,
555555
),
556556
child: Container(
557-
padding: EdgeInsetsDirectional.only(
558-
top: Screens.topSafeHeight,
559-
end: 14.0,
560-
),
561-
color: themeData.canvasColor.withOpacity(0.85),
562-
child: Row(
557+
padding: EdgeInsetsDirectional.only(top: Screens.topSafeHeight),
558+
color: themeData.canvasColor,
559+
child: Stack(
560+
fit: StackFit.expand,
563561
children: <Widget>[
564-
const BackButton(),
562+
Row(
563+
children: <Widget>[
564+
const BackButton(),
565+
const Spacer(),
566+
if (isAppleOS && provider != null) selectButton(context),
567+
if (!isAppleOS && (provider != null || isWeChatMoment))
568+
Padding(
569+
padding: const EdgeInsetsDirectional.only(end: 14),
570+
child: confirmButton(context),
571+
),
572+
],
573+
),
565574
if (!isAppleOS && specialPickerType == null)
566575
StreamBuilder<int>(
567576
initialData: currentIndex,
568577
stream: pageStreamController.stream,
569-
builder: (BuildContext _, AsyncSnapshot<int> snapshot) {
570-
return Text(
578+
builder: (_, AsyncSnapshot<int> snapshot) => Center(
579+
child: Text(
571580
'${snapshot.data! + 1}/${previewAssets.length}',
572581
style: const TextStyle(
573582
fontSize: 18.0,
574583
fontWeight: FontWeight.bold,
575584
),
576-
);
577-
},
585+
),
586+
),
578587
),
579-
const Spacer(),
580-
if (isAppleOS && provider != null) selectButton(context),
581-
if (!isAppleOS && (provider != null || isWeChatMoment))
582-
confirmButton(context),
583588
],
584589
),
585590
),

0 commit comments

Comments
 (0)