Skip to content

Commit f1da7c6

Browse files
committed
fix: use string instead of enum
1 parent 1a5c108 commit f1da7c6

File tree

3 files changed

+3
-18
lines changed

3 files changed

+3
-18
lines changed

mobile-app/lib/models/learn/challenge_model.dart

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -23,21 +23,6 @@ enum ChallengeType {
2323
exam // 17
2424
}
2525

26-
enum HelpCategory {
27-
htmlCss('HTML-CSS'),
28-
javascript('JavaScript'),
29-
python('Python'),
30-
backend('Backend Development'),
31-
csharp('C-Sharp'),
32-
english('English'),
33-
odin('Odin'),
34-
euler('Euler'),
35-
rosetta('Rosetta');
36-
37-
final String value;
38-
const HelpCategory(this.value);
39-
}
40-
4126
class Challenge {
4227
final String id;
4328
final String block;
@@ -48,7 +33,7 @@ class Challenge {
4833
final String superBlock;
4934
final String? videoId;
5035
final int challengeType;
51-
final HelpCategory helpCategory;
36+
final String helpCategory;
5237

5338
final List<ChallengeTest> tests;
5439
final List<ChallengeFile> files;

mobile-app/lib/ui/views/learn/widgets/dynamic_panel/panels/hint/hint_widget_view.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Future<String> genForumLink(
6060
}) async {
6161
Challenge? currChallenge = challenge;
6262

63-
final HelpCategory helpCategory = challenge.helpCategory;
63+
final String helpCategory = challenge.helpCategory;
6464
final String blockTitle = block.name;
6565

6666
final userDeviceInfo = await getDeviceInfo(context);

mobile-app/test/unit/learn_file_controller_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ void main() {
1818
dashedName: 'hello-world',
1919
superBlock: '2022/responsive-web-design',
2020
challengeType: 1,
21-
helpCategory: HelpCategory.htmlCss,
21+
helpCategory: 'HTML-CSS',
2222
tests: [],
2323
files: [
2424
ChallengeFile(

0 commit comments

Comments
 (0)