mirror of
https://github.com/lifegpc/eh_downloader_flutter.git
synced 2026-07-08 01:30:28 +08:00
Add settings to side menu
This commit is contained in:
@@ -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(
|
||||||
|
|||||||
Reference in New Issue
Block a user