DefinedUnit.fromJson constructor
DefinedUnit.fromJson(
- Map<String, dynamic> json
)
Implementation
factory DefinedUnit.fromJson(Map<String, dynamic> json) {
return DefinedUnit(
code: json['code'] as String,
codeUC: json['CODE'] as String?,
property: json['property'] as String,
isMetric: json['isMetric'] as bool?,
isSpecial: json['isSpecial'] as bool?,
value: json['value'] == null
? Value()
: Value.fromJson(json['value']! as Map<String, dynamic>),
class_: json['class'] as String,
names: json['name'] is List<dynamic>
? (json['name'] as List<dynamic>)
.map((dynamic e) => e.toString())
.toList()
: null,
printSymbol: json['printSymbol'] as String?,
);
}