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.

23 lines
385 B
Dart

4 years ago
class Hospital{
3 years ago
int id;
4 years ago
String name;
Hospital({
this.id,
this.name,
});
factory Hospital.fromJson(Map<String,dynamic> parsedJson){
return Hospital(
3 years ago
id: parsedJson["id"],
name: parsedJson["custName"],
4 years ago
);
}
factory Hospital.fromHospital(Hospital hospital){
return Hospital(
id: hospital?.id,
name: hospital?.name,
);
}
}