Keep backBtn in landscape mode, just align it to the right
This commit is contained in:
parent
7c76fc9c09
commit
e34479ccd8
@ -73,7 +73,7 @@ class _WonderEditorialScreenState extends State<WonderEditorialScreen> {
|
|||||||
|
|
||||||
/// Attempt to maintain a similar aspect ratio for the image within the app-bar
|
/// Attempt to maintain a similar aspect ratio for the image within the app-bar
|
||||||
double maxAppBarHeight = min(context.widthPx, $styles.sizes.maxContentWidth1) * 1.2;
|
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(
|
return PopRouterOnOverScroll(
|
||||||
controller: _scroller,
|
controller: _scroller,
|
||||||
child: ColoredBox(
|
child: ColoredBox(
|
||||||
@ -169,18 +169,23 @@ class _WonderEditorialScreenState extends State<WonderEditorialScreen> {
|
|||||||
),
|
),
|
||||||
|
|
||||||
/// Home Btn
|
/// Home Btn
|
||||||
if (showBackBtn) ...[
|
AnimatedBuilder(
|
||||||
AnimatedBuilder(
|
animation: _scroller,
|
||||||
animation: _scroller,
|
builder: (_, child) {
|
||||||
builder: (_, child) {
|
return AnimatedOpacity(
|
||||||
return AnimatedOpacity(
|
opacity: _scrollPos.value > 0 ? 0 : 1,
|
||||||
opacity: _scrollPos.value > 0 ? 0 : 1,
|
duration: $styles.times.med,
|
||||||
duration: $styles.times.med,
|
child: child,
|
||||||
child: child,
|
);
|
||||||
);
|
},
|
||||||
},
|
child: Align(
|
||||||
child: AppHeader(backIcon: AppIcons.north, isTransparent: true))
|
alignment: backBtnAlign,
|
||||||
],
|
child: Padding(
|
||||||
|
padding: EdgeInsets.all($styles.insets.sm),
|
||||||
|
child: BackBtn(icon: AppIcons.north),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user