AddressModel.fromJson constructor Null safety

AddressModel.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory AddressModel.fromJson(Map<String, dynamic> json) => AddressModel(
      id: json["id"],
      customerId: json["customerID"],
      firstName: json["firstName"],
      lastName: json["lastName"],
      address: json["address"],
      building: json["building"],
      floor: json["floor"],
      apartment: json["apartment"],
      postalCode: json["postalCode"],
      mobile: json["mobile"],
      isDefault: json["isDefault"],
      name: json["name"],
      zoneId: json["zoneID"],
      latitude: json["latitude"],
      longitude: json["longitude"],
      locationUrl: json["locationUrl"],
      city: json["city"] == null ? null : CityModel.fromJson(json["city"]),
      orderCount: json["orderCount"],
    );