changed difficulty logic
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user