Add settings to side menu

This commit is contained in:
2023-09-14 16:47:42 +08:00
parent 26692551f7
commit bc435bb567

View File

@@ -37,8 +37,7 @@ class HomePage extends HookWidget {
), ),
drawer: Drawer( drawer: Drawer(
child: ListView.builder( child: ListView.builder(
padding: EdgeInsets.zero, itemCount: 3,
itemCount: 2,
itemBuilder: (context, i) { itemBuilder: (context, i) {
if (i == 0) { if (i == 0) {
return Row( 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(); return Container();
})), })),
body: Center( body: Center(