Center align home menu, cap width of btns according to vertical space
This commit is contained in:
parent
3721d75a8e
commit
e734b5cec7
@ -40,6 +40,7 @@ class HomeMenu extends StatelessWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
final double gridWidth = (context.heightPx / 2).clamp(200, 450);
|
||||||
return Stack(
|
return Stack(
|
||||||
children: [
|
children: [
|
||||||
/// Backdrop / Underlay
|
/// Backdrop / Underlay
|
||||||
@ -73,22 +74,29 @@ class HomeMenu extends StatelessWidget {
|
|||||||
child: SafeArea(
|
child: SafeArea(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: EdgeInsets.symmetric(horizontal: $styles.insets.lg),
|
padding: EdgeInsets.symmetric(horizontal: $styles.insets.lg),
|
||||||
|
child: Center(
|
||||||
|
child: SizedBox(
|
||||||
|
width: gridWidth,
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.end,
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
children: [
|
children: [
|
||||||
Spacer(flex: 3),
|
Gap($styles.insets.md),
|
||||||
|
Spacer(),
|
||||||
_buildIconGrid(context)
|
_buildIconGrid(context)
|
||||||
.animate()
|
.animate()
|
||||||
.fade(duration: $styles.times.fast)
|
.fade(duration: $styles.times.fast)
|
||||||
.scale(begin: .8, curve: Curves.easeOut),
|
.scale(begin: .8, curve: Curves.easeOut),
|
||||||
Spacer(flex: 2),
|
Gap($styles.insets.lg),
|
||||||
_buildBottomBtns(context),
|
_buildBottomBtns(context),
|
||||||
Gap($styles.insets.xl),
|
Spacer(),
|
||||||
|
Gap($styles.insets.md),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user