workouttest_app/lib/model/exercise_device.dart

20 lines
508 B
Dart

class ExerciseDevice {
int exerciseDeviceId;
String name;
String description;
String imageUrl;
String nameTranslation;
int sort;
bool place;
ExerciseDevice.fromJson(Map json) {
this.exerciseDeviceId = json['exerciseDeviceId'];
this.name = json['name'];
this.description = json['description'];
this.imageUrl = json['imageUrl'];
this.nameTranslation = json['translations'][0]['name'];
this.sort = json['sort'];
this.place = json['place'] == 1 ? true : false;
}
}