ScanQr.fromJson constructor

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

Implementation

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