changed difficulty logic

This commit is contained in:
SomnusVeritas
2023-10-03 23:06:20 +02:00
parent 10463bb61a
commit 518631f37f
4 changed files with 24 additions and 11 deletions

View File

@@ -40,7 +40,9 @@ class _CreateRecipeState extends State<CreateRecipe> {
label: Text('Description'),
),
),
const DifficultyDropdown(),
DifficultyDropdown(
onChanged: _onChanged,
),
IngredientsWidget(
width: width * 0.9,
),
@@ -49,4 +51,8 @@ class _CreateRecipeState extends State<CreateRecipe> {
),
);
}
void _onChanged(int index) {
_recipeDifficulty = Difficulty.values.elementAt(index);
}
}