cropImage method

  1. @override
Future<Uint8List?> cropImage({
  1. required Uint8List bytes,
  2. required double width,
  3. required double height,
})
override

crop image by width and height

Implementation

@override
Future<Uint8List?> cropImage({
  required Uint8List bytes,
  required double width,
  required double height,
}) {
  return methodChannel
      .invokeMethod<Uint8List>('cropImage', {
        'bytes': bytes,
        'length': bytes.length,
        'width': width,
        'height': height,
      })
      .then((value) => value)
      .onError((error, stackTrace) => null);
}