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(States.fromJson(v)); }); } if (json['account_types'] != null) { accountTypes = json['account_types'].cast(); } error = json['error']; message = json['message']; } Map toJson() { final Map data = {}; if (states != null) { data['states'] = states!.map((v) => v.toJson()).toList(); } if (accountTypes != null) { data['account_types'] = accountTypes; } data['error'] = error; data['message'] = 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 = {}; data['id'] = id; data['name'] = name; return data; } }