onReceivedFromNative method
Implementation
@override
Future<void> onReceivedFromNative(MethodCall call) async {
if (call.method == SendConstants.onSuccess) {
switch (T) {
case IdExtractionResult:
_onResult(IdExtractionResult(call.arguments) as T);
break;
case GenericIdExtractionResult:
_onResult(GenericIdExtractionResult(call.arguments) as T);
break;
case PassportExtractionResult:
_onResult(PassportExtractionResult(call.arguments) as T);
break;
case VehicleLicenseExtractionResult:
_onResult(VehicleLicenseExtractionResult(call.arguments) as T);
break;
case FaceMatchResult:
_onResult(FaceMatchResult(call.arguments) as T);
break;
}
} else if (call.method == SendConstants.onFailure) {
_onFailure(DigifiedError(call.arguments));
} else if (call.method == SendConstants.onUploadProgress) {
_onUploadProgress(call.arguments[Inbound.captureType],
call.arguments[Inbound.uploadProgress]);
} else if (call.method == SendConstants.onUploadingDone) {
_onUploadingDone(call.arguments[Inbound.captureType]);
}
}