crop_your_image
crop_your_image copied to clipboard
Assertion _targetImage!=null
Situation: After cropping, onCropped and onStatusChanged with status= ready were called. At this time the crop widget still shows the progress indicator for a while loading the cropped image Following Exception when I start a new crop before the progress indicator has gone:
E/flutter (17760): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: 'package:crop_your_image/src/crop.dart': Failed assertion: line 412 pos 12: '_targetImage != null': is not true.
E/flutter (17760): #0 _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:51:61)
E/flutter (17760): #1 _AssertionError._throwNew (dart:core-patch/errors_patch.dart:40:5)
E/flutter (17760): #2 _CropEditorState._crop (package:crop_your_image/src/crop.dart:412:12)
E/flutter (17760): #3 CropController.crop (package:crop_your_image/src/controller.dart:11:34)
E/flutter (17760): #4 _BildausschnittRouteState._cropImage (package:xyz/route/BildausschnittRoute.dart:242:16)
E/flutter (17760): #5 _InkResponseState.handleTap (package:flutter/src/material/ink_well.dart:1072:21)
E/flutter (17760): #6 GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:253:24)
E/flutter (17760): #7 TapGestureRecognizer.handleTapUp (package:flutter/src/gestures/tap.dart:627:11)
E/flutter (17760): #8 BaseTapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:306:5)
E/flutter (17760): #9 BaseTapGestureRecognizer.handlePrimaryPointer (package:flutter/src/gestures/tap.dart:239:7)
E/flutter (17760): #10 PrimaryPointerGestureRecognizer.handleEvent (package:flutter/src/gestures/recognizer.dart:615:9)
E/flutter (17760): #11 PointerRouter._dispatch (package:flutter/src/gestures/pointer_router.dart:98:12)
E/flutter (17760): #12 PointerRouter._dispatchEventToRoutes.
Is there a way to be informed when _target image is set, so I can block possibility for start new crop till this point?
@ChristophKe Thank you for the issue. I'll check.