Keep backBtn in landscape mode, just align it to the right

This commit is contained in:
Shawn 2023-12-05 10:59:01 -07:00
parent 7c76fc9c09
commit e34479ccd8

View File

@ -73,7 +73,7 @@ class _WonderEditorialScreenState extends State<WonderEditorialScreen> {
/// Attempt to maintain a similar aspect ratio for the image within the app-bar
double maxAppBarHeight = min(context.widthPx, $styles.sizes.maxContentWidth1) * 1.2;
bool showBackBtn = appLogic.shouldUseNavRail() == false;
final backBtnAlign = appLogic.shouldUseNavRail() ? Alignment.topRight : Alignment.topLeft;
return PopRouterOnOverScroll(
controller: _scroller,
child: ColoredBox(
@ -169,7 +169,6 @@ class _WonderEditorialScreenState extends State<WonderEditorialScreen> {
),
/// Home Btn
if (showBackBtn) ...[
AnimatedBuilder(
animation: _scroller,
builder: (_, child) {
@ -179,8 +178,14 @@ class _WonderEditorialScreenState extends State<WonderEditorialScreen> {
child: child,
);
},
child: AppHeader(backIcon: AppIcons.north, isTransparent: true))
],
child: Align(
alignment: backBtnAlign,
child: Padding(
padding: EdgeInsets.all($styles.insets.sm),
child: BackBtn(icon: AppIcons.north),
),
),
)
],
),
),