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:
vjrj 2026-07-11 06:52:05 +02:00
parent 62ed4f79b3
commit 4af90876f4

View file

@ -27,6 +27,13 @@ class AppDrawer extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.stretch, crossAxisAlignment: CrossAxisAlignment.stretch,
children: [ children: [
const _DrawerHeader(), 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( _DrawerItem(
icon: const SeedGlyph(SeedGlyphs.jars, size: 23), icon: const SeedGlyph(SeedGlyphs.jars, size: 23),
label: t.menu.inventory, label: t.menu.inventory,
@ -53,7 +60,7 @@ class AppDrawer extends StatelessWidget {
context.push('/sales'); context.push('/sales');
}, },
), ),
// "What's due this month" the aggregate crop calendar, offline. // "What's due this month" the aggregate crop calendar.
_DrawerItem( _DrawerItem(
icon: const Icon(Icons.calendar_month), icon: const Icon(Icons.calendar_month),
label: t.menu.calendar, label: t.menu.calendar,
@ -97,8 +104,13 @@ class AppDrawer extends StatelessWidget {
icon: const Icon(Icons.favorite), icon: const Icon(Icons.favorite),
label: t.menu.wishlist, label: t.menu.wishlist,
), ),
_DrawerItem(icon: const Icon(Icons.group), label: t.menu.following), _DrawerItem(
const Spacer(), icon: const Icon(Icons.group),
label: t.menu.following,
),
],
),
),
const Divider(height: 1), const Divider(height: 1),
_DrawerItem( _DrawerItem(
icon: const Icon(Icons.auto_stories_outlined), icon: const Icon(Icons.auto_stories_outlined),