openCropper static method

Future<Uint8List?> openCropper(
  1. BuildContext context,
  2. Uint8List bytes, {
  3. double? aspectRatio,
})

Open full-screen cropper and return cropped bytes

Implementation

static Future<Uint8List?> openCropper(
    BuildContext context,
    Uint8List bytes, {
      double? aspectRatio, // e.g. 1.0, 16/9, or null for freeform
    }) async {
  return await Navigator.push(
    context,
    MaterialPageRoute(
      builder: (_) => CropPage(imageBytes: bytes, aspectRatio: aspectRatio),
    ),
  );
}