|
|
@@ -53,8 +53,8 @@ class StringXmlWatcherBuilder implements Builder {
|
|
|
|
|
|
multiBuffer.writeln('class StringMultiSource {');
|
|
|
multiBuffer.writeln(' StringMultiSource._();');
|
|
|
- multiBuffer
|
|
|
- .writeln(' static const Map<String, Map<String, String>> values = {');
|
|
|
+ multiBuffer.writeln(
|
|
|
+ ' static const Map<String, Map<String, String>> translations = {');
|
|
|
multiBuffer.writeln(' \'${_config.language}\': {'); // 默认基准语言
|
|
|
|
|
|
// 遍历所有 XML 文件
|
|
|
@@ -70,7 +70,7 @@ class StringXmlWatcherBuilder implements Builder {
|
|
|
if (name != null) {
|
|
|
final camelCaseName = _toCamelCase(name);
|
|
|
buffer.writeln(
|
|
|
- ' static final String $camelCaseName = \'$name\'.tr; // $value');
|
|
|
+ ' static String get $camelCaseName => \'$name\'.tr; // $value');
|
|
|
multiBuffer.writeln(' \'$name\': \'$value\',');
|
|
|
}
|
|
|
}
|