Skip to content

Commit

Permalink
fix: context disposed error (#172)
Browse files Browse the repository at this point in the history
  • Loading branch information
chooyan-eng authored Dec 11, 2024
1 parent 05d2f61 commit 5139639
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/src/widget/crop.dart
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,10 @@ class _CropEditorState extends State<_CropEditor> {

/// reset image to be cropped
void _resetImage(Uint8List targetImage) {
if (!mounted) {
return;
}

widget.onStatusChanged?.call(CropStatus.loading);

/// reset view state back to preparing state
Expand Down

0 comments on commit 5139639

Please sign in to comment.