Create Settings View
PatHock opened this issue · comments
End goal
- Allow user to toggle dark/light theme, log into his/her account etc.
- User info such as height, weight etc can be input in the settings view
Relevant Info/Links
This could be implemented with a drawer.
https://flutter.io/cookbook/design/drawer/
Your Code
This was taken from the flutter cookbook link above.
Drawer(
// Add a ListView to the drawer. This ensures the user can scroll
// through the options in the Drawer if there isn't enough vertical
// space to fit everything.
child: ListView(
// Important: Remove any padding from the ListView.
padding: EdgeInsets.zero,
children: <Widget>[
DrawerHeader(
child: Text('Drawer Header'),
decoration: BoxDecoration(
color: Colors.blue,
),
),
ListTile(
title: Text('Item 1'),
onTap: () {
// Update the state of the app
// ...
},
),
ListTile(
title: Text('Item 2'),
onTap: () {
// Update the state of the app
// ...
},
),
],
),
);