我尝试通过firebase_ml_vision使用面部检测器程序包,这是代码
detectFaces(File image) async {
final myimage = FirebaseVisionImage.fromFile(image);
final faceDetector = FirebaseVision.instance.faceDetector(
FaceDetectorOptions(
mode: FaceDetectorMode.accurate,
enableLandmarks: true,
enableClassification: true));
问题是...每当我单击手机上的后退按钮时,我总是会paused on exception
说
Exception has occurred.
_AssertionError ('package:firebase_ml_vision/src/firebase_vision.dart': Failed assertion: line 111 pos 12: 'image != null': is not true.)
有没有一种方法可以防止异常暂停