forked from eatvio/eatvio_app
my diets have been update
This commit is contained in:
@@ -233,7 +233,13 @@ class _CreateDietScreenContentState extends State<CreateDietScreenContent> {
|
||||
else
|
||||
CustomOutlinedButton(
|
||||
onPressed: () {
|
||||
context.read<CreateDietCubit>().publishDiet();
|
||||
if (widget.diet != null) {
|
||||
context.read<CreateDietCubit>().updateDiet(
|
||||
widget.diet!.id,
|
||||
);
|
||||
} else {
|
||||
context.read<CreateDietCubit>().createDiet();
|
||||
}
|
||||
},
|
||||
text: widget.diet != null ? s.save : s.publish,
|
||||
height: 52,
|
||||
|
||||
Reference in New Issue
Block a user