We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a57ba56 commit e2490cdCopy full SHA for e2490cd
1 file changed
lib/src/widgets/custom_image_crop_widget.dart
@@ -101,14 +101,14 @@ class _CustomImageCropState extends State<CustomImageCrop> with CustomImageCropL
101
102
@override
103
Widget build(BuildContext context) {
104
- if (imageAsUIImage == null) {
+ final image = imageAsUIImage;
105
+ if (image == null) {
106
return const Center(child: CircularProgressIndicator());
107
}
108
return LayoutBuilder(
109
builder: (context, constraints) {
110
width = constraints.maxWidth;
111
height = constraints.maxHeight;
- final image = imageAsUIImage!;
112
final cropWidth = min(width, height) * widget.cropPercentage;
113
final defaultScale = min(image.width, image.height) / cropWidth;
114
final scale = data.scale * defaultScale;
0 commit comments