CropImage constructor
const
CropImage({
- Key? key,
- CropController? controller,
- required Image image,
- Color gridColor = Colors.white70,
- Color? gridInnerColor,
- Color? gridCornerColor,
- double paddingSize = 0,
- double touchSize = 50,
- double gridCornerSize = 25,
- double gridThinWidth = 2,
- double gridThickWidth = 5,
- Color scrimColor = Colors.black54,
- bool alwaysShowThirdLines = false,
- ValueChanged<
Rect> ? onCrop, - double minimumImageSize = 100,
- double maximumImageSize = double.infinity,
- bool alwaysMove = false,
Implementation
const CropImage({
Key? key,
this.controller,
required this.image,
this.gridColor = Colors.white70,
Color? gridInnerColor,
Color? gridCornerColor,
this.paddingSize = 0,
this.touchSize = 50,
this.gridCornerSize = 25,
this.gridThinWidth = 2,
this.gridThickWidth = 5,
this.scrimColor = Colors.black54,
this.alwaysShowThirdLines = false,
this.onCrop,
this.minimumImageSize = 100,
this.maximumImageSize = double.infinity,
this.alwaysMove = false,
}) : gridInnerColor = gridInnerColor ?? gridColor,
gridCornerColor = gridCornerColor ?? gridColor,
assert(gridCornerSize > 0, 'gridCornerSize cannot be zero'),
assert(touchSize > 0, 'touchSize cannot be zero'),
assert(gridThinWidth > 0, 'gridThinWidth cannot be zero'),
assert(gridThickWidth > 0, 'gridThickWidth cannot be zero'),
assert(minimumImageSize > 0, 'minimumImageSize cannot be zero'),
assert(maximumImageSize >= minimumImageSize,
'maximumImageSize cannot be less than minimumImageSize'),
super(key: key);