Methods.fromJson constructor
Methods.fromJson(
- Map<String, dynamic> json
)
Implementation
Methods.fromJson(Map<String, dynamic> json) {
if (json['free_shipping'] != null) {
freeShipping = [];
json['free_shipping'].forEach((v) {
freeShipping!.add(FreeShipping.fromJson(v));
});
}
if (json['flat_rate'] != null) {
flatRate = [];
json['flat_rate'].forEach((v) {
flatRate!.add(FlatRate.fromJson(v));
});
}
if (json['local_pickup'] != null) {
localPickup = [];
json['local_pickup'].forEach((v) {
localPickup!.add(LocalPickup.fromJson(v));
});
}
}