File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -2,12 +2,12 @@ import 'dart:async';
2
2
import 'dart:ui' as ui;
3
3
4
4
import 'package:custom_image_crop/custom_image_crop.dart' ;
5
+ import 'package:custom_image_crop/src/calculators/calculate_crop_params.dart' ;
6
+ import 'package:custom_image_crop/src/calculators/calculate_on_crop_params.dart' ;
7
+ import 'package:custom_image_crop/src/clippers/inverted_clipper.dart' ;
5
8
import 'package:flutter/material.dart' ;
6
9
import 'package:gesture_x_detector/gesture_x_detector.dart' ;
7
10
import 'package:vector_math/vector_math_64.dart' as vector_math;
8
- import 'package:custom_image_crop/src/clippers/inverted_clipper.dart' ;
9
- import 'package:custom_image_crop/src/calculators/calculate_crop_params.dart' ;
10
- import 'package:custom_image_crop/src/calculators/calculate_on_crop_params.dart' ;
11
11
12
12
/// An image cropper that is customizable.
13
13
/// You can rotate, scale and translate either
@@ -154,6 +154,12 @@ class _CustomImageCropState extends State<CustomImageCrop>
154
154
_getImage ();
155
155
}
156
156
157
+ @override
158
+ void didUpdateWidget (CustomImageCrop oldWidget) {
159
+ super .didUpdateWidget (oldWidget);
160
+ if (oldWidget.image != widget.image) _getImage ();
161
+ }
162
+
157
163
void _getImage () {
158
164
final oldImageStream = _imageStream;
159
165
_imageStream = widget.image.resolve (createLocalImageConfiguration (context));
You can’t perform that action at this time.
0 commit comments