Data.fromJson constructor
Implementation
Data.fromJson(Map<String, dynamic> json) {
firstName = json['first_name'];
lastName = json['last_name'];
displayName = json['display_name'];
avatar = json['avatar'];
shipping = json['shipping'] != null
? new Shipping.fromJson(json['shipping'])
: null;
billing =
json['billing'] != null ? new Billing.fromJson(json['billing']) : null;
if (json['meta_data'] != null && Map.of(json['meta_data']).isNotEmpty) {
this.metaData = [];
Map.from(json['meta_data']).forEach((key, value) {
this.metaData!.add(MetaData.fromJson(key, value));
});
}
}