OrderInfo.fromJson constructor

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

Creates a OrderInfo object from a JSON object

Implementation

factory OrderInfo.fromJson(Map<String, dynamic> json) {
  return OrderInfo(
    name: json['name'],
    phoneNumber: json['phone_number'],
    email: json['email'],
    shippingAddress: json['shipping_address'] != null
        ? ShippingAddress.fromJson(json['shipping_address'])
        : null,
  );
}