added simple recipeProvider

This commit is contained in:
SomnusVeritas
2023-10-17 17:28:09 +02:00
parent 3c747daf9d
commit c04416a93e

View File

@@ -0,0 +1,19 @@
import 'package:flutter/material.dart';
import '../../models/recipe.dart';
class RecipeProvider extends ChangeNotifier {
Recipe? _selectedRecipe;
Recipe? get selectedRecipe => _selectedRecipe;
set selectedRecipe(Recipe? recipe) {
_selectedRecipe = recipe;
notifyListeners();
}
void clearRecipe() {
_selectedRecipe = null;
notifyListeners();
}
}