Error : Caused by: android.system.ErrnoException: open failed: EACCES (Permission denied)

I am using Image Gallery Picker ( ) and after I targeted SDK to API level 29… the image is not saving to my gallery Caused by android.system.ErrnoException: open failed: EACCES (Permission denied)

please check my error code on gethub:


Beside needing to add WRITE_EXTERNAL_STORAGE and READ_EXTERNAL_STORAGE to your android/app/src/main/AndroidManifest.xml

<manifest xmlns:android=""
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>

You also need Runtime Request Permission, by using simple_permissions package:

import 'package:simple_permissions/simple_permissions.dart';

PermissionStatus permissionResult = await SimplePermissions.requestPermission(Permission. WriteExternalStorage);
if (permissionResult == PermissionStatus.authorized){
  // code of read or write file in external storage (SD card)