forked from eatvio/eatvio_app
fat(recipes, diets): added list refreshing
This commit is contained in:
@@ -74,8 +74,14 @@ class MyRecipesScreen extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
context.push(RecipeCreateScreen.path);
|
||||
onTap: () async {
|
||||
final result = await context.push(RecipeCreateScreen.path);
|
||||
if (!context.mounted) return;
|
||||
if (result == MyRecipesCubit.drafted) {
|
||||
await context.read<MyRecipesCubit>().setDraftedState();
|
||||
} else if (result == MyRecipesCubit.active) {
|
||||
await context.read<MyRecipesCubit>().setActiveState();
|
||||
}
|
||||
},
|
||||
borderRadius: BorderRadius.circular(100),
|
||||
child: Container(
|
||||
|
||||
Reference in New Issue
Block a user