pickImageWithPhotoLibrary method

  1. @override
Future<File> pickImageWithPhotoLibrary({
  1. double? width,
  2. double? height,
  3. int? imageQuality,
})
override

Implementation

@override
Future<File> pickImageWithPhotoLibrary(
    {double? width, double? height, int? imageQuality}) async {
  Map<String, dynamic> args = {
    'width': width,
    'height': height,
    'imageQuality': imageQuality
  };
  String? result;
  if (Platform.isAndroid) {
    result = await _pickerService.pickImageFromGallery(
        width: width, height: height, imageQuality: imageQuality);
  } else if (Platform.isIOS) {
    result =
        await methodChannel.invokeMethod('pickImageWithPhotoLibrary', args);
  }
  return File(result!);
}