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.
24 lines
392 B
Dart
24 lines
392 B
Dart
class Hospital {
|
|
int? id;
|
|
String? name;
|
|
|
|
Hospital({
|
|
this.id,
|
|
this.name,
|
|
});
|
|
|
|
factory Hospital.fromJson(Map<String, dynamic> parsedJson) {
|
|
return Hospital(
|
|
id: parsedJson["id"],
|
|
name:parsedJson["custName"],
|
|
);
|
|
}
|
|
|
|
factory Hospital.fromHospital(Hospital? hospital) {
|
|
return Hospital(
|
|
id: hospital?.id,
|
|
name: hospital?.name,
|
|
);
|
|
}
|
|
}
|