You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
fluffychat/lib/pangea/course_plans/course_location_model.dart

31 lines
639 B
Dart

class CourseLocationModel {
String uuid;
String name;
List<String> mediaIds;
CourseLocationModel({
required this.uuid,
required this.name,
required this.mediaIds,
});
factory CourseLocationModel.fromJson(Map<String, dynamic> json) {
return CourseLocationModel(
uuid: json['uuid'] as String,
name: json['name'] as String,
mediaIds: (json['media_ids'] as List<dynamic>?)
?.map((e) => e as String)
.toList() ??
[],
);
}
Map<String, dynamic> toJson() {
return {
'uuid': uuid,
'name': name,
'media_ids': mediaIds,
};
}
}