Country.fromJson constructor

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

Implementation

Country.fromJson(Map<String, dynamic> json) {
  id = json['id'];
  name = json['name'];
  emoji = json['emoji'];

  if (json['state'] != null) {
    state = [];
    json['state'].forEach((v) {
      state.add(new Region.fromJson(v));
    });
  }
}