workouttest_app/lib/model/product.dart

21 lines
515 B
Dart

class ExerciseTree {
int treeId;
int parentId;
String name;
String imageUrl;
bool active;
String nameTranslation;
ExerciseTree.fromJson(Map json) {
this.treeId = json['treeId'];
this.name = json['name'];
this.parentId = json['parentId'];
this.imageUrl = json['imageUrl'];
this.active = json['active'];
this.nameTranslation =
json['translations'] != null && (json['translations']).length > 0
? json['translations'][0]['name']
: this.name;
}
}