added difficulty class and dropdown
This commit is contained in:
8
lib/models/difficulty.dart
Normal file
8
lib/models/difficulty.dart
Normal 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 }
|
||||
@@ -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 }
|
||||
|
||||
Reference in New Issue
Block a user