fix(drawer): scroll destinations, pin the utility footer
The drawer was a single Column with a Spacer pinning intro/Settings/About to the bottom. Once Calendar was added it overflowed a short screen (~94px), so Settings and About fell off-screen and their navigation tests couldn't tap them. Put the destinations in a scrolling ListView and keep the header and the utility footer pinned, so Settings/About stay reachable at any height. Fixes the about_screen/home_screen drawer navigation tests.
This commit is contained in:
parent
62ed4f79b3
commit
4af90876f4
1 changed files with 80 additions and 68 deletions
|
|
@ -27,6 +27,13 @@ class AppDrawer extends StatelessWidget {
|
|||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
const _DrawerHeader(),
|
||||
// The destinations scroll; the header above and the utility footer
|
||||
// below stay pinned, so Settings/About are always reachable even on
|
||||
// a short screen (drawer used to overflow once Calendar was added).
|
||||
Expanded(
|
||||
child: ListView(
|
||||
padding: EdgeInsets.zero,
|
||||
children: [
|
||||
_DrawerItem(
|
||||
icon: const SeedGlyph(SeedGlyphs.jars, size: 23),
|
||||
label: t.menu.inventory,
|
||||
|
|
@ -53,7 +60,7 @@ class AppDrawer extends StatelessWidget {
|
|||
context.push('/sales');
|
||||
},
|
||||
),
|
||||
// "What's due this month" — the aggregate crop calendar, offline.
|
||||
// "What's due this month" — the aggregate crop calendar.
|
||||
_DrawerItem(
|
||||
icon: const Icon(Icons.calendar_month),
|
||||
label: t.menu.calendar,
|
||||
|
|
@ -97,8 +104,13 @@ class AppDrawer extends StatelessWidget {
|
|||
icon: const Icon(Icons.favorite),
|
||||
label: t.menu.wishlist,
|
||||
),
|
||||
_DrawerItem(icon: const Icon(Icons.group), label: t.menu.following),
|
||||
const Spacer(),
|
||||
_DrawerItem(
|
||||
icon: const Icon(Icons.group),
|
||||
label: t.menu.following,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
const Divider(height: 1),
|
||||
_DrawerItem(
|
||||
icon: const Icon(Icons.auto_stories_outlined),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue