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(
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(