changed difficulty logic

This commit is contained in:
SomnusVeritas
2023-10-03 23:06:20 +02:00
parent 10463bb61a
commit 518631f37f
4 changed files with 24 additions and 11 deletions

View File

@@ -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 }

View File

@@ -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();