ChargeShipping.fromJson constructor

ChargeShipping.fromJson(
  1. Object? json
)

Implementation

factory ChargeShipping.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return ChargeShipping(
    address: map['address'] == null ? null : Address.fromJson(map['address']),
    carrier: map['carrier'] == null ? null : (map['carrier'] as String),
    name: map['name'] == null ? null : (map['name'] as String),
    phone: map['phone'] == null ? null : (map['phone'] as String),
    trackingNumber: map['tracking_number'] == null
        ? null
        : (map['tracking_number'] as String),
  );
}