id_card_info_model.dart 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. import 'dart:typed_data';
  2. class IdCardInfoModel {
  3. String certType;
  4. String peopleName;
  5. String idCard;
  6. String sex;
  7. Uint8List? wltData;
  8. String base64Image;
  9. String people;
  10. String birthDay;
  11. String address;
  12. IdCardInfoModel({
  13. this.certType = "",
  14. this.peopleName = "",
  15. this.idCard = "",
  16. this.sex = "",
  17. this.wltData,
  18. this.base64Image = "",
  19. this.people = "",
  20. this.birthDay = "",
  21. this.address = "",
  22. });
  23. factory IdCardInfoModel.fromJson(Map json) => IdCardInfoModel(
  24. certType: json["certType"] == null ? "" : json["certType"],
  25. peopleName: json["peopleName"] == null ? "" : json["peopleName"],
  26. idCard: json["idCard"] == null ? "" : json["idCard"],
  27. sex: json["sex"] == null ? "" : json["sex"],
  28. wltData: json["wltData"] == null ? null : json["wltData"],
  29. base64Image: json["base64Image"] == null ? "" : json["base64Image"],
  30. people: json["people"] == null ? "" : json["people"],
  31. birthDay: json["birthDay"] == null ? "" : json["birthDay"],
  32. address: json["address"] == null ? "" : json["address"],
  33. );
  34. Map<String, dynamic> toJson() => {
  35. "cityName": certType,
  36. "contactName": peopleName,
  37. "mobile": idCard,
  38. "sex": sex,
  39. "tag": wltData == null ? null : wltData,
  40. "base64Image": base64Image,
  41. "people": people,
  42. "birthDay": birthDay,
  43. "address": address,
  44. };
  45. }