Skip to content
This repository was archived by the owner on Oct 20, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
61b08f8
Build with Material 3
SeineEloquenz Aug 5, 2024
fdd4298
Migrate bottomsheet to Material 3
SeineEloquenz Aug 5, 2024
b1be386
Update bottom sheet styling
SeineEloquenz Aug 5, 2024
bfd714c
Fix accent color usage for ThemeData
SeineEloquenz Aug 5, 2024
5df850f
Replace custom search widget by SearchBar
SeineEloquenz Aug 6, 2024
4587c50
Migrate recipe view colors
SeineEloquenz Aug 6, 2024
6ae61e9
Refactor bottom sheets
SeineEloquenz Aug 6, 2024
cd5ce30
Refactor recipe grid components
SeineEloquenz Aug 6, 2024
bb092da
Remove bottom sheet name
SeineEloquenz Aug 6, 2024
a08a381
Update recipe detail tabbar widget
SeineEloquenz Aug 6, 2024
6f9244b
Migrate MaterialButtons
SeineEloquenz Aug 6, 2024
67186e2
Migrate recipe_shopping_list_stateful_widget
SeineEloquenz Aug 6, 2024
a737d0d
Align recipe view chips with other chips
SeineEloquenz Aug 6, 2024
277ceb2
Update shopping list page
SeineEloquenz Aug 6, 2024
21628a6
Update spaces page
SeineEloquenz Aug 6, 2024
000fed5
Fix invisible switch states
SeineEloquenz Aug 6, 2024
dc59713
Migrate recipes list
SeineEloquenz Aug 6, 2024
62a7586
Migrate meal plan list
SeineEloquenz Aug 6, 2024
4b03a60
Migrate meal plan grid
SeineEloquenz Aug 6, 2024
04169fe
Migrate recipe details widget
SeineEloquenz Aug 6, 2024
a2c7019
Migrate units page
SeineEloquenz Aug 6, 2024
1b91d16
Migrate foods page
SeineEloquenz Aug 6, 2024
cf08695
Migrate recipe upsert page
SeineEloquenz Aug 6, 2024
ea04733
Replace hardcoded colors on detail page
SeineEloquenz Aug 6, 2024
d7650db
Add dynamic color support
SeineEloquenz Aug 6, 2024
aca200b
Fix colors on meal plan text
SeineEloquenz Aug 6, 2024
15bca9a
Improve search bar styling
SeineEloquenz Aug 6, 2024
9878a89
Remove explicit app bar background color setting
SeineEloquenz Aug 6, 2024
9f176d2
Fix color of SearchBar
SeineEloquenz Aug 6, 2024
7f6e074
Replace hardcoded colors on recipes list page
SeineEloquenz Aug 6, 2024
dd42df0
Replace hardcoded colors on upsert steps page
SeineEloquenz Aug 6, 2024
ac66670
Fix textTheme usage
SeineEloquenz Aug 6, 2024
c33ea44
Fix usage of color without scheme
SeineEloquenz Aug 6, 2024
55792ec
Enable dynamic color by default
SeineEloquenz Aug 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,74 +12,49 @@ Future mealPlanEntryMoreBottomSheet(BuildContext context, MealPlanEntry mealPlan
MealPlanBloc mealPlanBloc = BlocProvider.of<MealPlanBloc>(context);

return showModalBottomSheet(
backgroundColor: Colors.transparent,
showDragHandle: true,
useRootNavigator: true,
context: context,
builder: (btsContext) => Container(
decoration: BoxDecoration(
color: Theme.of(context).scaffoldBackgroundColor,
borderRadius: const BorderRadius.all(Radius.circular(10))
),
margin: const EdgeInsets.all(12),
child: Wrap(
children: [
Container(
height: 44,
builder: (btsContext) => Wrap(
children: [
Container(
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius: const BorderRadius.vertical(top: Radius.circular(10)),
color: (Theme.of(context).brightness.name == 'light') ? Colors.grey[300] : Colors.grey[700]
),
child: Text(
(mealPlan.recipe != null) ? mealPlan.recipe!.name : mealPlan.title,
textAlign: TextAlign.center,
style: const TextStyle(
fontWeight: FontWeight.bold,
fontSize: 18,
),
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
),
Container(
alignment: Alignment.center,
padding: const EdgeInsets.only(left: 12, right: 12, bottom: 6),
child: Column(
children: [
padding: const EdgeInsets.only(left: 12, right: 12, bottom: 6),
child: Column(
children: [
ListTile(
onTap: () {
Navigator.pop(btsContext);
upsertMealPlanEntryDialog(context, mealPlan: mealPlan, referer: 'edit');
},
leading: const Icon(Icons.edit_outlined),
title: Text(AppLocalizations.of(context)!.edit)
),
if (mealPlan.recipe != null)
ListTile(
onTap: () {
Navigator.pop(btsContext);
upsertMealPlanEntryDialog(context, mealPlan: mealPlan, referer: 'edit');
recipeShoppingListBottomSheet(context, mealPlan.recipe!);
},
leading: const Icon(Icons.edit_outlined),
title: Text(AppLocalizations.of(context)!.edit)
leading: const Icon(Icons.add_shopping_cart_outlined),
title: Text(AppLocalizations.of(context)!.addToShoppingList)
),
if (mealPlan.recipe != null)
ListTile(
onTap: () {
Navigator.pop(btsContext);
recipeShoppingListBottomSheet(context, mealPlan.recipe!);
},
leading: const Icon(Icons.add_shopping_cart_outlined),
title: Text(AppLocalizations.of(context)!.addToShoppingList)
),
const Divider(),
ListTile(
onTap: () {
Navigator.pop(btsContext);
mealPlanBloc.add(DeleteMealPlan(mealPlan: mealPlan));
},
leading: const Icon(Icons.delete_outline, color: Colors.redAccent),
title: Text(
AppLocalizations.of(context)!.mealPlanRemove,
style: const TextStyle(color: Colors.redAccent)
)
const Divider(),
ListTile(
onTap: () {
Navigator.pop(btsContext);
mealPlanBloc.add(DeleteMealPlan(mealPlan: mealPlan));
},
leading: const Icon(Icons.delete_outline, color: Colors.redAccent),
title: Text(
AppLocalizations.of(context)!.mealPlanRemove,
style: const TextStyle(color: Colors.redAccent)
)
]
)
)
],
),
)
)
]
)
)
],
),
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,66 +5,43 @@ import 'package:untare/components/dialogs/edit_meal_type_dialog.dart';

Future mealPlanMoreBottomSheet(BuildContext context) {
return showModalBottomSheet(
backgroundColor: Colors.transparent,
showDragHandle: true,
useRootNavigator: true,
context: context,
builder: (btsContext) => Container(
decoration: BoxDecoration(
color: Theme.of(context).scaffoldBackgroundColor,
borderRadius: const BorderRadius.all(Radius.circular(10))
),
margin: const EdgeInsets.all(12),
child: Wrap(
spacing: 15,
children: [
Container(
height: 44,
builder: (btsContext) => Wrap(
spacing: 15,
children: [
Container(
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius: const BorderRadius.vertical(top: Radius.circular(10)),
color: (Theme.of(context).brightness.name == 'light') ? Colors.grey[300] : Colors.grey[700]
),
child: Text(
AppLocalizations.of(context)!.mealPlanTitle,
textAlign: TextAlign.center,
style: const TextStyle(
fontWeight: FontWeight.bold,
fontSize: 18
),
),
),
Container(
alignment: Alignment.center,
padding: const EdgeInsets.only(left: 12, right: 12, bottom: 6),
child: Column(
children: [
ListTile(
minLeadingWidth: 35,
onTap: () {
Navigator.pop(btsContext);
editMealTypeDialog(context);
},
leading: const Icon(Icons.edit_outlined),
title: Text(AppLocalizations.of(context)!.editMealType),
),
const Divider(),
ListTile(
minLeadingWidth: 35,
onTap: () {
Navigator.pop(btsContext);
deleteMealTypeDialog(context);
},
leading: const Icon(Icons.delete_outline, color: Colors.redAccent),
title: Text(
AppLocalizations.of(context)!.removeMealType,
style: const TextStyle(color: Colors.redAccent),
)
padding: const EdgeInsets.only(left: 12, right: 12, bottom: 6),
child: Column(
children: [
ListTile(
minLeadingWidth: 35,
onTap: () {
Navigator.pop(btsContext);
editMealTypeDialog(context);
},
leading: const Icon(Icons.edit_outlined),
title: Text(AppLocalizations.of(context)!.editMealType),
),
const Divider(),
ListTile(
minLeadingWidth: 35,
onTap: () {
Navigator.pop(btsContext);
deleteMealTypeDialog(context);
},
leading: const Icon(Icons.delete_outline, color: Colors.redAccent),
title: Text(
AppLocalizations.of(context)!.removeMealType,
style: const TextStyle(color: Colors.redAccent),
)
]
)
)
],
),
)
)
]
)
)
],
),
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,39 +4,14 @@ import 'package:untare/models/recipe.dart';

Future recipeMoreBottomSheet(BuildContext context, Recipe recipe) {
return showModalBottomSheet(
backgroundColor: Colors.transparent,
showDragHandle: true,
useRootNavigator: true,
context: context,
builder: (btsContext) => Container(
decoration: BoxDecoration(
color: Theme.of(context).scaffoldBackgroundColor,
borderRadius: const BorderRadius.all(Radius.circular(10))
),
margin: const EdgeInsets.all(12),
child: Wrap(
spacing: 15,
children: [
Container(
height: 44,
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius: const BorderRadius.vertical(top: Radius.circular(10)),
color: (Theme.of(context).brightness.name == 'light') ? Colors.grey[300] : Colors.grey[700]
),
child: Text(
recipe.name,
textAlign: TextAlign.center,
style: const TextStyle(
fontWeight: FontWeight.bold,
fontSize: 18
),
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
),
buildRecipeMore(context, btsContext, recipe)
],
),
)
builder: (btsContext) => Wrap(
spacing: 15,
children: [
buildRecipeMore(context, btsContext, recipe)
],
),
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,38 +6,30 @@ import 'package:untare/models/recipe.dart';
Future recipeShoppingListBottomSheet(BuildContext context, Recipe recipe) {
return showModalBottomSheet(
isScrollControlled: true,
backgroundColor: Colors.transparent,
showDragHandle: true,
useRootNavigator: true,
context: context,
builder: (btsContext) => Container(
decoration: BoxDecoration(
color: Theme.of(context).scaffoldBackgroundColor,
borderRadius: const BorderRadius.all(Radius.circular(10))
),
margin: const EdgeInsets.all(12),
child: Wrap(
children: [
Container(
height: 44,
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius: const BorderRadius.vertical(top: Radius.circular(10)),
color: (Theme.of(context).brightness.name == 'light') ? Colors.grey[300] : Colors.grey[700]
),
child: Text(
recipe.name,
textAlign: TextAlign.center,
style: const TextStyle(
fontWeight: FontWeight.bold,
fontSize: 18
),
maxLines: 1,
overflow: TextOverflow.ellipsis,
builder: (btsContext) => Wrap(
children: [
Container(
height: 44,
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius: const BorderRadius.vertical(top: Radius.circular(10)),
),
child: Text(
recipe.name,
textAlign: TextAlign.center,
style: const TextStyle(
fontWeight: FontWeight.bold,
fontSize: 18
),
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
SizedBox(height: 600,child: RecipeShoppingListWidget(recipe: recipe, btsContext: btsContext))
],
),
)
),
SizedBox(height: 600,child: RecipeShoppingListWidget(recipe: recipe, btsContext: btsContext))
],
),
);
}
Loading