passo_mobile_app/lib/model/passo/city.dart

30 lines
649 B
Dart
Raw Normal View History

2023-09-01 03:22:48 +00:00
// To parse this JSON data, do
//
// final city = cityFromJson(jsonString);
import 'dart:convert';
City cityFromJson(String str) => City.fromJson(json.decode(str));
String cityToJson(City data) => json.encode(data.toJson());
class City {
final String? cityCode;
final String? cityDescription;
City({
this.cityCode,
this.cityDescription,
});
factory City.fromJson(Map<String, dynamic> json) => City(
cityCode: json["city_code"],
cityDescription: json["city_description"],
);
Map<String, dynamic> toJson() => {
"city_code": cityCode,
"city_description": cityDescription,
};
}