Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
TarekkMA committed Feb 8, 2024
1 parent e00e425 commit 730339f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions bin/generate.dart
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,9 @@ String _processKeys(
classContent +=
nestedObject.isRootObject ? '' : ' const ${nestedObject.className}();\n';
if (nestedObject.shouldHaveValueGetter) {
classContent += ' String val() => \'${nestedObject.value}\';\n';
classContent += ' String get key => \'${nestedObject.value}\';\n';
classContent += ' @override\n';
classContent += ' String toString() => \'${nestedObject.value}\';\n';
}

final translations = nestedObject.translations;
Expand Down Expand Up @@ -346,7 +348,8 @@ class CodegenLoader extends AssetLoader{
}

gFile +=
'static const Map<String, Map<String,dynamic>> mapLocales = {${listLocales.join(', ')}};';
'static const Map<String, Map<String,dynamic>> mapLocales = {${listLocales.join(', ')}};\n';
gFile += '}\n';
classBuilder.writeln(gFile);
}

Expand Down

0 comments on commit 730339f

Please sign in to comment.