pickAsBytes method
Future<Uint8List?>
pickAsBytes({
- required BuildContext context,
- ImageSource imageSource = ImageSource.gallery,
- double? ratioX,
- double? ratioY,
Implementation
Future<Uint8List?> pickAsBytes(
{required BuildContext context,
ImageSource imageSource = ImageSource.gallery,
double? ratioX,
double? ratioY}) async {
XFile? xFile =
await getImagePicker(context)!.pickImage(source: imageSource);
if (xFile == null) {
return null;
}
return await _handleImageCropping(context, xFile,
ratioX: ratioX, ratioY: ratioY, asBytes: true);
}