flutter_meal final
This commit is contained in:
@@ -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,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user