Country.fromJson constructor

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

Implementation

factory Country.fromJson(Map<String, dynamic> json) => Country(
      code: json["code"],
      name: json["name"],
      states: List<State>.from(json["states"].map((x) => State.fromJson(x))),
      currencyCode: json["currency_code"],
      currencyPos: json["currency_pos"] == null
          ? null
          : currencyPosValues.map[json["currency_pos"]],
      decimalSep: json["decimal_sep"] == null
          ? null
          : sepValues.map[json["decimal_sep"]],
      dimensionUnit: json["dimension_unit"] == null
          ? null
          : dimensionUnitValues.map[json["dimension_unit"]],
      numDecimals: json["num_decimals"],
      thousandSep: json["thousand_sep"] == null
          ? null
          : sepValues.map[json["thousand_sep"]],
      weightUnit: json["weight_unit"] == null
          ? null
          : weightUnitValues.map[json["weight_unit"]],
    );