DiscountData.fromJson constructor

DiscountData.fromJson(
  1. dynamic data
)

Implementation

factory DiscountData.fromJson(dynamic data) {
  var json = DynamicJsonExtension.getJsonMap(data);
  return DiscountData(
    discount: json['discount'] != null
        ? DiscountItem.fromJson(json['discount'])
        : null,
    amount: json['amount'],
  );
}