auto_crop 1.0.2
auto_crop: ^1.0.2 copied to clipboard
Flutter package that allows auto cropping images with a custom and adjustable shape.
auto_crop #
Dart native image cropper package that allows cropping images with a custom and adjustable shape.
💡 Please note that the package is only for Android & iOS. 💡
For other platforms I recommend using: custom_cropper - dart native cropper.
Preview #
Example usage #
Basic usage #
Widget build(Build context) {
...
// Define AutoCrop widget in the tree and pass the CropController.
AutoCrop(
imageFile,
controller: _cropController,
),
...
// Call crop method on CropController to get
// the cropped image result (Uint8List) data.
ElevatedButton(
onPressed: () async {
final croppedData = await _cropController.crop();
},
child: const Text('Crop image'),
),
}
Full example #
Full example showing how to set up and use AutoCrop. Source code