changed difficulty logic
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
class Difficulty {
|
||||
class DifficultyUtil {
|
||||
static List<String> get difficulties {
|
||||
return List<String>.generate(_Difficulty.values.length,
|
||||
(index) => _Difficulty.values.elementAt(index).name);
|
||||
return List<String>.generate(Difficulty.values.length,
|
||||
(index) => Difficulty.values.elementAt(index).name);
|
||||
}
|
||||
}
|
||||
|
||||
enum _Difficulty { veryEasy, easy, intermediate, hard, veryHard }
|
||||
enum Difficulty { veryEasy, easy, intermediate, hard, veryHard }
|
||||
|
||||
@@ -5,7 +5,7 @@ import 'steps.dart';
|
||||
class Recipe {
|
||||
final String title;
|
||||
final String description;
|
||||
final Difficulty? difficulty;
|
||||
final DifficultyUtil? difficulty;
|
||||
final List<Ingredient> ingredients = [];
|
||||
final Steps steps = Steps();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user