From bc435bb56700f0bbe5e53d6c7df83d73b32d96cb Mon Sep 17 00:00:00 2001 From: lifegpc Date: Thu, 14 Sep 2023 16:47:42 +0800 Subject: [PATCH] Add settings to side menu --- lib/home.dart | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/lib/home.dart b/lib/home.dart index 7e7f46b..f4fe244 100644 --- a/lib/home.dart +++ b/lib/home.dart @@ -37,8 +37,7 @@ class HomePage extends HookWidget { ), drawer: Drawer( child: ListView.builder( - padding: EdgeInsets.zero, - itemCount: 2, + itemCount: 3, itemBuilder: (context, i) { if (i == 0) { return Row( @@ -60,6 +59,16 @@ class HomePage extends HookWidget { }, ); } + if (i == 2) { + return ListTile( + leading: const Icon(Icons.settings), + title: Text(AppLocalizations.of(context)!.settings), + onTap: () { + Scaffold.of(context).closeDrawer(); + context.push("/settings"); + }, + ); + } return Container(); })), body: Center(