Skip to content
This repository has been archived by the owner on Jun 29, 2022. It is now read-only.

Commit

Permalink
Fix getx exporter
Browse files Browse the repository at this point in the history
  • Loading branch information
SchabanBo committed Jul 4, 2021
1 parent aae473d commit afbf0e5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/services/exporters/getx_exporter_servvice.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'dart:convert';
import 'dart:io';

import '../../models/local_data.dart';
Expand All @@ -21,7 +22,7 @@ class AppTranslation {
String getDataAsString() {
var result = '';
for (var node in data.data) {
result += '\'${node.name}\':${flatNodes('', node)},';
result += '"${node.name}":${flatNodes('', node)},';
result += '\n';
}
return result;
Expand All @@ -31,7 +32,7 @@ class AppTranslation {
final result = <String, String>{};
parent = parent.isEmpty ? '' : parent + '_';
result.addEntries(node.items
.map((e) => MapEntry('\'$parent${e.key}\'', '\'${e.value}\'')));
.map((e) => MapEntry('"$parent${e.key}"', jsonEncode(e.value))));
for (var item in node.nodes) {
result.addAll(flatNodes('$parent${item.name}', item));
}
Expand Down

0 comments on commit afbf0e5

Please sign in to comment.