DynamicImageCrop.fromFile constructor
DynamicImageCrop.fromFile({
- required File imageFile,
- required CropController controller,
- required void onResult(),
- ImageByteFormat? imageByteFormat,
- Color? cropLineColor,
- double? cropLineWidth,
- Key? key,
Input image as File.
Declare CropController variable and input it to control this Widget.
onResult is a callback function that returns the cropped image, width, and height.
Implementation
DynamicImageCrop.fromFile({
required File imageFile,
required this.controller,
required this.onResult,
this.imageByteFormat,
this.cropLineColor,
this.cropLineWidth,
super.key,
}) : image = imageFile.readAsBytesSync();