WSShipping.fromJson constructor

WSShipping.fromJson(
  1. Map<String, dynamic> json
)

Implementation

WSShipping.fromJson(Map<String, dynamic> json) {
  parentId = json['parent_id'];
  name = json['name'];
  if (json['locations'] != null) {
    locations = [];
    json['locations'].forEach((v) {
      locations!.add(Locations.fromJson(v));
    });
  }
  methods =
      json['methods'] != null ? Methods.fromJson(json['methods']) : null;
}