import 'dart:ui'; class IDCardRecognition { Future initiate(ModelDataInformation modelDataInfo) async { return true; } Future evaluateOneImage(Image image) async { try { return null; } catch (e) { return null; } } void writeDatatoFile() {} String _addLeadingZero(int value) { return value.toString().padLeft(2, '0'); } void release() {} } class ModelDataInformation { final String ocrv4DetInfer; final String ocrv4RecInfer; final String ppocrKeysV1; final String ppocrMobileClsTrain; ModelDataInformation({ required this.ocrv4DetInfer, required this.ocrv4RecInfer, required this.ppocrKeysV1, required this.ppocrMobileClsTrain, }); } // 定义 IDCardRecogResult 结构体 class IDCardRecogResultInfo { int numerStatus; String? name; String? idNumber; String? gender; String? nation; String? birthdate; String? address; IDCardRecogResultInfo({ this.numerStatus = 0, this.name, this.idNumber, this.gender, this.nation, this.birthdate, this.address, }); }