added difficulty class and dropdown

This commit is contained in:
SomnusVeritas
2023-10-02 20:10:09 +02:00
parent bd546ffaaf
commit c12271cbc2
4 changed files with 17 additions and 7 deletions

View File

@@ -0,0 +1,8 @@
class Difficulty {
static List<String> get difficulties {
return List<String>.generate(_Difficulty.values.length,
(index) => _Difficulty.values.elementAt(index).name);
}
}
enum _Difficulty { veryEasy, easy, intermediate, hard, veryHard }

View File

@@ -1,3 +1,4 @@
import 'difficulty.dart';
import 'ingredient.dart';
import 'steps.dart';
@@ -14,5 +15,3 @@ class Recipe {
this.difficulty,
});
}
enum Difficulty { veryEasy, easy, intermediate, hard, veryHard }