class ServicePoint { final int servicePointId; final String name; const ServicePoint({ required this.servicePointId, required this.name, }); factory ServicePoint.fromJson(Map json) { return ServicePoint( servicePointId: (json["ServicePointID"] as num).toInt(), name: (json["ServicePointName"] as String?) ?? "Service Point", ); } }