forked from eatvio/eatvio_app
fix(recipe): infinity loading recipe edit
This commit is contained in:
@@ -16,6 +16,7 @@ import 'package:path_provider/path_provider.dart';
|
|||||||
class CreateRecipeCubit extends Cubit<CreateRecipeState> {
|
class CreateRecipeCubit extends Cubit<CreateRecipeState> {
|
||||||
final RecipeRepository recipeRepository;
|
final RecipeRepository recipeRepository;
|
||||||
final GlossaryRepository glossaryRepository;
|
final GlossaryRepository glossaryRepository;
|
||||||
|
|
||||||
CreateRecipeCubit({
|
CreateRecipeCubit({
|
||||||
required this.recipeRepository,
|
required this.recipeRepository,
|
||||||
required this.glossaryRepository,
|
required this.glossaryRepository,
|
||||||
@@ -192,7 +193,7 @@ class CreateRecipeCubit extends Cubit<CreateRecipeState> {
|
|||||||
recipe.steps!.map(
|
recipe.steps!.map(
|
||||||
(e) async => StepEntity(
|
(e) async => StepEntity(
|
||||||
description: e.description,
|
description: e.description,
|
||||||
image: await downloadImageAsFile('$baseUrl/storage/${e.image}'),
|
image: e.image.isEmpty ? null : await downloadImageAsFile('$baseUrl/storage/${e.image}'),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user