CropImage constructor

const CropImage({
  1. Key? key,
  2. CropController? controller,
  3. required Image image,
  4. Color gridColor = Colors.white70,
  5. Color? gridInnerColor,
  6. Color? gridCornerColor,
  7. double paddingSize = 0,
  8. double touchSize = 50,
  9. double gridCornerSize = 25,
  10. double gridThinWidth = 2,
  11. double gridThickWidth = 5,
  12. Color scrimColor = Colors.black54,
  13. bool alwaysShowThirdLines = false,
  14. ValueChanged<Rect>? onCrop,
  15. double minimumImageSize = 100,
  16. double maximumImageSize = double.infinity,
  17. 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);