workouttest_app/lib/model/property.dart
2021-04-02 11:42:26 +02:00

18 lines
522 B
Dart

class Property {
late int propertyId;
late String propertyName;
late String propertyUnit;
late String propertyNameTranslation;
int? top;
int? left;
double? value;
Property.fromJson(Map json) {
this.propertyId = json['propertyId'];
this.propertyName = json['propertyName'];
this.propertyUnit = json['propertyUnit'];
this.propertyNameTranslation =
json['translations'] != null && (json['translations']).length > 0 ? json['translations'][0]['propertyName'] : this.propertyName;
}
}