mirror of
https://mirror.ghproxy.com/https://github.com/StarCitizenToolBox/app.git
synced 2024-12-23 17:03:45 +08:00
60 lines
1.4 KiB
Dart
60 lines
1.4 KiB
Dart
|
class AppAdvancedLocalizationData {
|
||
|
AppAdvancedLocalizationData({
|
||
|
this.classKeys,
|
||
|
});
|
||
|
|
||
|
AppAdvancedLocalizationData.fromJson(dynamic json) {
|
||
|
if (json['class_keys'] != null) {
|
||
|
classKeys = [];
|
||
|
json['class_keys'].forEach((v) {
|
||
|
classKeys?.add(AppAdvancedLocalizationClassKeysData.fromJson(v));
|
||
|
});
|
||
|
}
|
||
|
}
|
||
|
|
||
|
List<AppAdvancedLocalizationClassKeysData>? classKeys;
|
||
|
|
||
|
Map<String, dynamic> toJson() {
|
||
|
final map = <String, dynamic>{};
|
||
|
if (classKeys != null) {
|
||
|
map['class_keys'] = classKeys?.map((v) => v.toJson()).toList();
|
||
|
}
|
||
|
return map;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
class AppAdvancedLocalizationClassKeysData {
|
||
|
AppAdvancedLocalizationClassKeysData({
|
||
|
this.id,
|
||
|
this.className,
|
||
|
this.keys,
|
||
|
});
|
||
|
|
||
|
AppAdvancedLocalizationClassKeysData.fromJson(dynamic json) {
|
||
|
id = json['id'];
|
||
|
className = json['class_name'];
|
||
|
keys = json['keys'] != null ? json['keys'].cast<String>() : [];
|
||
|
}
|
||
|
|
||
|
String? id;
|
||
|
String? className;
|
||
|
List<String>? keys;
|
||
|
Map<String, String> valuesMap = {};
|
||
|
AppAdvancedLocalizationClassKeysDataMode mode =
|
||
|
AppAdvancedLocalizationClassKeysDataMode.localization;
|
||
|
|
||
|
Map<String, dynamic> toJson() {
|
||
|
final map = <String, dynamic>{};
|
||
|
map['id'] = id;
|
||
|
map['class_name'] = className;
|
||
|
map['keys'] = keys;
|
||
|
return map;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
enum AppAdvancedLocalizationClassKeysDataMode {
|
||
|
unLocalization,
|
||
|
localization,
|
||
|
mixed,
|
||
|
}
|