recipes can be added to db from createpage

This commit is contained in:
SomnusVeritas
2023-11-13 17:57:38 +01:00
parent 384744729b
commit 64e983bc59
5 changed files with 25 additions and 6 deletions

View File

@@ -5,9 +5,9 @@ import '../../models/recipe.dart';
class RecipeProvider extends ChangeNotifier {
Recipe? _recipe;
Recipe get recipe => _recipe ??= Recipe(id: 0, title: '');
Recipe? get recipe => _recipe;
set recipe(Recipe recipe) {
set recipe(Recipe? recipe) {
_recipe = recipe;
notifyListeners();
}