class commonAddAccountsViewResponse { List? states; List? accountTypes; String? error; String? message; commonAddAccountsViewResponse({ this.states, this.accountTypes, this.error, this.message, }); commonAddAccountsViewResponse.fromJson(Map json) { if (json['states'] != null) { states = []; json['states'].forEach((v) { states!.add(new States.fromJson(v)); }); } if(json['account_types']!=null){ accountTypes = json['account_types'].cast(); } error = json['error']; message = json['message']; } Map toJson() { final Map data = new Map(); if (this.states != null) { data['states'] = this.states!.map((v) => v.toJson()).toList(); } if(this.accountTypes!=null){ data['account_types'] = this.accountTypes; } data['error'] = this.error; data['message'] = this.message; return data; } } class States { String? id; String? name; States({this.id, this.name}); States.fromJson(Map json) { id = json['id']; name = json['name']; } Map toJson() { final Map data = new Map(); data['id'] = this.id; data['name'] = this.name; return data; } }