make theming prettier and darker
This commit is contained in:
@ -7,52 +7,32 @@ class MyDrawer extends StatelessWidget {
|
||||
const MyDrawer({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
Widget build(BuildContext context) => Drawer(
|
||||
backgroundColor: Color(0xff3f3f3f),
|
||||
child: ListView(children: [
|
||||
SizedBox(
|
||||
height: 75,
|
||||
),
|
||||
_listelement('Home', Icons.home, Section.HOME, context),
|
||||
_listelement('Shuffle', Icons.update, Section.SHUFFLE, context),
|
||||
_listelement(
|
||||
'Categories', Icons.category, Section.CATEGORIE, context),
|
||||
_listelement('Actors', Icons.people, Section.ACTOR, context),
|
||||
_listelement('Settings', Icons.settings, Section.SETTING, context),
|
||||
]),
|
||||
);
|
||||
|
||||
Widget _listelement(
|
||||
String text, IconData icon, Section section, BuildContext context) {
|
||||
final ctx = DrawerContext.of(context);
|
||||
|
||||
return Drawer(
|
||||
child: ListView(children: [
|
||||
ListTile(
|
||||
title: const Text('Home'),
|
||||
leading: const Icon(Icons.home),
|
||||
onTap: () {
|
||||
ctx.onChangePage(Section.HOME);
|
||||
Navigator.pop(context);
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
title: const Text('Shuffle'),
|
||||
leading: const Icon(Icons.update),
|
||||
onTap: () {
|
||||
ctx.onChangePage(Section.SHUFFLE);
|
||||
Navigator.pop(context);
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
title: const Text('Categories'),
|
||||
leading: const Icon(Icons.category),
|
||||
onTap: () {
|
||||
ctx.onChangePage(Section.CATEGORIE);
|
||||
Navigator.pop(context);
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
title: const Text('Actors'),
|
||||
leading: const Icon(Icons.people),
|
||||
onTap: () {
|
||||
ctx.onChangePage(Section.ACTOR);
|
||||
Navigator.pop(context);
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
title: const Text('Settings'),
|
||||
leading: const Icon(Icons.settings),
|
||||
onTap: () {
|
||||
ctx.onChangePage(Section.SETTING);
|
||||
Navigator.pop(context);
|
||||
},
|
||||
),
|
||||
]),
|
||||
return ListTile(
|
||||
title: Text(text, style: TextStyle(color: Color(0xffe9e9e9))),
|
||||
leading: Icon(icon, color: Color(0xffe9e9e9)),
|
||||
onTap: () {
|
||||
ctx.onChangePage(section);
|
||||
Navigator.pop(context);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user