Refactored the code so that DifficultyDropdown

is not longer needed
This commit is contained in:
SomnusVeritas
2023-10-17 18:17:59 +02:00
parent e69aab7a04
commit 11266b9ab4
3 changed files with 15 additions and 34 deletions

View File

@@ -1,9 +1,6 @@
import 'package:flutter/material.dart';
import 'package:rezepte/widgets/ingredients_bottomsheet.dart';
import '../widgets/ingredients_widget.dart';
import '../models/difficulty.dart';
import '../widgets/difficulty_dropdown.dart';
class CreateRecipe extends StatefulWidget {
const CreateRecipe({super.key});
@@ -41,8 +38,9 @@ class _CreateRecipeState extends State<CreateRecipe> {
label: Text('Description'),
),
),
DifficultyDropdown(
onChanged: _onChanged,
DropdownMenu<Difficulty?>(
dropdownMenuEntries: DifficultyUtil.getDropdownList(),
onSelected: (value) {},
),
ElevatedButton(
onPressed: _openIngredientBottomSheet,