73 lines
1.7 KiB
Dart
73 lines
1.7 KiB
Dart
class GetCountryModel {
|
|
List<Data>? data;
|
|
|
|
GetCountryModel({ this.data});
|
|
|
|
GetCountryModel.fromJson(Map<String, dynamic> json) {
|
|
if (json['data'] != null) {
|
|
data = <Data>[];
|
|
json['data'].forEach((v) {
|
|
data!.add(new Data.fromJson(v));
|
|
});
|
|
}
|
|
|
|
}
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
|
if (this.data != null) {
|
|
data['data'] = this.data!.map((v) => v.toJson()).toList();
|
|
}
|
|
return data;
|
|
}
|
|
}
|
|
|
|
class Data {
|
|
String? id;
|
|
String? countryName;
|
|
String? countryCode;
|
|
String? isdCode;
|
|
String? flagIcon;
|
|
Null? currencyXid;
|
|
bool? isActive;
|
|
Null? createdBy;
|
|
Null? modifiedBy;
|
|
|
|
Data(
|
|
{this.id,
|
|
this.countryName,
|
|
this.countryCode,
|
|
this.isdCode,
|
|
this.flagIcon,
|
|
this.currencyXid,
|
|
this.isActive,
|
|
this.createdBy,
|
|
this.modifiedBy});
|
|
|
|
Data.fromJson(Map<String, dynamic> json) {
|
|
id = json['id'];
|
|
countryName = json['countryName'];
|
|
countryCode = json['countryCode'];
|
|
isdCode = json['isdCode'];
|
|
flagIcon = json['flagIcon'];
|
|
currencyXid = json['currency_xid'];
|
|
isActive = json['isActive'];
|
|
createdBy = json['createdBy'];
|
|
modifiedBy = json['modifiedBy'];
|
|
}
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
|
data['id'] = this.id;
|
|
data['countryName'] = this.countryName;
|
|
data['countryCode'] = this.countryCode;
|
|
data['isdCode'] = this.isdCode;
|
|
data['flagIcon'] = this.flagIcon;
|
|
data['currency_xid'] = this.currencyXid;
|
|
data['isActive'] = this.isActive;
|
|
data['createdBy'] = this.createdBy;
|
|
data['modifiedBy'] = this.modifiedBy;
|
|
return data;
|
|
}
|
|
}
|