flutter_meal final

This commit is contained in:
Gogs
2024-03-11 15:49:06 +01:00
parent 4d170f524c
commit e3931d8b82
6 changed files with 182 additions and 144 deletions
+2 -2
View File
@@ -34,8 +34,8 @@ class CategoryGridItem extends StatelessWidget {
child: Text(
category.title,
style: Theme.of(context).textTheme.titleLarge!.copyWith(
color: Theme.of(context).colorScheme.onBackground,
),
color: Theme.of(context).colorScheme.onBackground,
),
),
),
);
+20 -51
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,24 +33,14 @@ 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,24 +49,14 @@ 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,
fontSize: 24,
),
style: Theme.of(context).textTheme.titleSmall!.copyWith(
color: Theme.of(context).colorScheme.onBackground,
fontSize: 24,
),
),
onTap: () {
onSelectScreen('meals');
@@ -87,24 +66,14 @@ 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,
fontSize: 24,
),
style: Theme.of(context).textTheme.titleSmall!.copyWith(
color: Theme.of(context).colorScheme.onBackground,
fontSize: 24,
),
),
onTap: () {
onSelectScreen('filters');