
import 'package:satu/core/models/flow/check_row_bean.dart';
import 'package:satu/core/utils/utils_parse.dart';

class CheckBean {
  List<CheckRowBean> rows =[];
  String? qr;
  String? link;

  static CheckBean? fromMap(dynamic map) {
    if (map == null) return null;
    final CheckBean checkBean = CheckBean();
    if(map['rows'] != null) {
      checkBean.rows.addAll(
          (map['rows'] as List).map((o) => CheckRowBean.fromMap(o))
      );
    }
    checkBean.qr = cast<String>(map['qr']);
    checkBean.link = cast<String>(map['link']);
    return checkBean;
  }

  Map toJson() => {
    'rows': rows,
    'qr': qr,
    'link': link,
  };
}