pickSingleImage static method
Future<FileData?>
pickSingleImage({
- UImageSource source = UImageSource.gallery,
- bool selfie = false,
- int? imageQuality,
- UCropOptions? crop,
- UCameraOptions? cameraOptions,
- dynamic action()?,
Implementation
static Future<FileData?> pickSingleImage({
UImageSource source = UImageSource.gallery,
bool selfie = false,
int? imageQuality,
UCropOptions? crop,
UCameraOptions? cameraOptions,
Function(FileData?)? action,
}) async {
final List<FileData> files = await pickImage(source: source, selfie: selfie, imageQuality: imageQuality, crop: crop, cameraOptions: cameraOptions);
final FileData? file = files.isEmpty ? null : files.first;
action?.call(file);
return file;
}