pickMediaWithCrop static method
Future<String?>
pickMediaWithCrop(
- BuildContext context,
- MediaSource source,
- MediaType type,
- MediaOptions options,
Pick media with interactive cropping UI if freeform cropping is enabled
Implementation
static Future<String?> pickMediaWithCrop(
BuildContext context,
MediaSource source,
MediaType type,
MediaOptions options,
) async {
// Check if interactive cropping is needed
if (options.cropOptions?.freeform == true &&
options.cropOptions?.enableCrop == true) {
return await _pickWithInteractiveCrop(context, source, type, options);
}
// Use regular picking for non-interactive cropping
return await MediaPickerPlusPlatform.instance.pickMedia(source, type, options);
}