Variant.fromMap constructor

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

Implementation

factory Variant.fromMap(Map<String, dynamic> json) => Variant(
    id: json["id"],
    name: json["name"],
    code: json["code"],
    slug: json["slug"],
    active: json["active"],
    isDefault: json["is_default"],
    options: json["options"] == null ? [] : List<String>.from(json["options"]!.map((x) => x)),
);