Skip to content

Instantly share code, notes, and snippets.

@shubie
Last active April 18, 2019 18:29
Show Gist options
  • Save shubie/93f4c71b25df14cba474cdcee55304e0 to your computer and use it in GitHub Desktop.
Save shubie/93f4c71b25df14cba474cdcee55304e0 to your computer and use it in GitHub Desktop.
class StateModel {
String state;
String alias;
List<String> lgas;
StateModel({this.state, this.alias, this.lgas});
StateModel.fromJson(Map<String, dynamic> json) {
state = json['state'];
alias = json['alias'];
lgas = json['lgas'].cast<String>();
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['state'] = this.state;
data['alias'] = this.alias;
data['lgas'] = this.lgas;
return data;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment