BusinessDelivery.fromJson constructor

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

Implementation

factory BusinessDelivery.fromJson(Map<String, dynamic> json) =>
    BusinessDelivery(
      pickUp: json["pickup"] ?? false,
      delivery: json["delivery"] ?? false,
      autoAccept: json["autoAccept"] ?? false,
      cancelFromUser: json["cancelFromUser"] ?? false,
      cashOnDelivery: json["cashOnDelivery"] ?? [],
      availableLocation:
          AvailableLocation.fromJson(json["availableLocation"] ??
              {
                "city": [],
                "state": [],
                "country": [],
                "pincode": [],
              }),
      orderPreparationTime: json["orderPreparartionTime"] ?? 0,
    );