Address constructor

Address({
  1. String? use,
  2. String? type,
  3. String? text,
  4. FixedList<String>? line,
  5. String? city,
  6. String? district,
  7. String? state,
  8. String? postalCode,
  9. String? country,
  10. Period? period,
})

Creates an instance of Address.

Implementation

Address({
  String? use,
  String? type,
  String? text,
  FixedList<String>? line,
  String? city,
  String? district,
  String? state,
  String? postalCode,
  String? country,
  Period? period,
}) : this.fromJson(
        JsonObject({
          if (use != null) useField.name: JsonString(use),
          if (type != null) typeField.name: JsonString(type),
          if (text != null) textField.name: JsonString(text),
          if (line != null)
            lineField.name: JsonArray.unmodifiable(line.map(JsonString.new)),
          if (city != null) cityField.name: JsonString(city),
          if (district != null) districtField.name: JsonString(district),
          if (state != null) stateField.name: JsonString(state),
          if (postalCode != null)
            postalCodeField.name: JsonString(postalCode),
          if (country != null) countryField.name: JsonString(country),
          if (period != null) periodField.name: period.json,
        }),
      );