CamerAwesome
CamerAwesome copied to clipboard
Add optional for storage permission on Android
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 analysewithout any issues.
Breaking Change
- [x] 🛠 My feature contain breaking change.
If your feature break something, please detail it
Thanks for submitting this PR, we will review it asap :)
- [ ] 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.