Variant.fromJson constructor

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

Implementation

factory Variant.fromJson(Map<String, dynamic> json) => Variant(
      combinationId: json["combination_id"],
      quantity: json["quantity"],
      options: json["options"] == null
          ? []
          : List<Option>.from(
              json["options"]!.map((x) => Option.fromJson(x))),
    );