CamerAwesome icon indicating copy to clipboard operation
CamerAwesome copied to clipboard

Add optional for storage permission on Android

Open nghiashiyi opened this issue 4 years ago • 2 comments

Description

Sometimes, developers don't need require WRITE STORAGE in android in their purpose. So it will a bit annoying to user when the storage permission was asked, so I hope it should have an option to ignore STORAGE permission

Checklist

Before creating any Pull Request, confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]).

  • [x] 📕 I read the Contributing page.
  • [x] 🤝 I match the actual coding style.
  • [x] ✅ I ran flutter analyse without any issues.

Breaking Change

  • [x] 🛠 My feature contain breaking change.

If your feature break something, please detail it

nghiashiyi avatar Aug 16 '21 05:08 nghiashiyi

Thanks for submitting this PR, we will review it asap :)

ghost avatar Aug 19 '21 11:08 ghost

  • [ ] There is some print comment to remove
  • [ ] nested if refactoring

Hard to maintain

if (permissions.isEmpty()) {
        permissions.add(CAMERA);
        if (!ignoreExternalStorage) {
            permissions.add(WRITE_EXTERNAL_STORAGE);
        }
    }
  • [ ] making a not on ignoreExternalStorage makes it hard to read. Prefer simplify condition by reversing it (bool externalStorage)

I'll had some more if you want work on this. Sorry for the delay.

g-apparence avatar Mar 24 '22 21:03 g-apparence