ScanQr.fromJson constructor

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

Implementation

ScanQr.fromJson(Map<String, dynamic> json) {
  if (json["id"] is String) this.id = json["id"];
  if (json["label"] is String) this.label = json["label"];
  if (json["beers"] is List)
    this.beers = json["beers"] == null
        ? null
        : (json["beers"] as List).map((e) => Beers.fromJson(e)).toList();
}