174 Start

This commit is contained in:
2024-03-08 13:44:56 +01:00
parent 03bb6f5b8f
commit 4d170f524c
3 changed files with 203 additions and 16 deletions
+55 -15
View File
@@ -1,7 +1,9 @@
import 'package:flutter/material.dart';
class MainDrawer extends StatelessWidget {
const MainDrawer({super.key});
const MainDrawer({ super.key, required this .onSelectScreen,});
final void Function(String identifier) onSelectScreen;
@override
Widget build(BuildContext context) {
@@ -13,8 +15,12 @@ class MainDrawer extends StatelessWidget {
decoration: BoxDecoration(
gradient: LinearGradient(
colors: [
Theme.of(context).colorScheme.primaryContainer,
Theme.of(context)
Theme
.of(context)
.colorScheme
.primaryContainer,
Theme
.of(context)
.colorScheme
.primaryContainer
.withOpacity(0.8),
@@ -28,14 +34,24 @@ class MainDrawer extends StatelessWidget {
Icon(
Icons.fastfood,
size: 48,
color: Theme.of(context).colorScheme.primary,
color: Theme
.of(context)
.colorScheme
.primary,
),
const SizedBox(width: 18),
Text(
'Cooking Up!',
style: Theme.of(context).textTheme.titleLarge!.copyWith(
color: Theme.of(context).colorScheme.primary,
),
style: Theme
.of(context)
.textTheme
.titleLarge!
.copyWith(
color: Theme
.of(context)
.colorScheme
.primary,
),
)
],
),
@@ -44,31 +60,55 @@ class MainDrawer extends StatelessWidget {
leading: Icon(
Icons.restaurant,
size: 26,
color: Theme.of(context).colorScheme.onBackground,
color: Theme
.of(context)
.colorScheme
.onBackground,
),
title: Text(
'Meals',
style: Theme.of(context).textTheme.titleSmall!.copyWith(
color: Theme.of(context).colorScheme.onBackground,
style: Theme
.of(context)
.textTheme
.titleSmall!
.copyWith(
color: Theme
.of(context)
.colorScheme
.onBackground,
fontSize: 24,
),
),
onTap: () {},
onTap: () {
onSelectScreen('meals');
},
),
ListTile(
leading: Icon(
Icons.settings,
size: 26,
color: Theme.of(context).colorScheme.onBackground,
color: Theme
.of(context)
.colorScheme
.onBackground,
),
title: Text(
'Filters',
style: Theme.of(context).textTheme.titleSmall!.copyWith(
color: Theme.of(context).colorScheme.onBackground,
style: Theme
.of(context)
.textTheme
.titleSmall!
.copyWith(
color: Theme
.of(context)
.colorScheme
.onBackground,
fontSize: 24,
),
),
onTap: () {},
onTap: () {
onSelectScreen('filters');
},
),
],
),