final version

This commit is contained in:
2024-03-12 08:57:09 +01:00
parent 4d170f524c
commit f927723068
8 changed files with 190 additions and 152 deletions
+15 -46
View File
@@ -1,7 +1,10 @@
import 'package:flutter/material.dart';
class MainDrawer extends StatelessWidget {
const MainDrawer({ super.key, required this .onSelectScreen,});
const MainDrawer({
super.key,
required this.onSelectScreen,
});
final void Function(String identifier) onSelectScreen;
@@ -15,12 +18,8 @@ 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),
@@ -34,23 +33,13 @@ 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,
),
)
],
@@ -60,22 +49,12 @@ 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,
),
),
@@ -87,22 +66,12 @@ class MainDrawer extends StatelessWidget {
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,
),
),