zeba_academy_permissions_handler 1.0.0
zeba_academy_permissions_handler: ^1.0.0 copied to clipboard
A Flutter package to simplify permission handling with offline fallback for camera, microphone, storage, and location.
zeba_academy_permissions_handler #
A simplified Flutter permissions handler to check, request, and monitor permissions for storage, camera, location, and microphone with offline fallback and detailed error reporting.
Features #
- ✅ Simplified permission management
- ✅ Check, request, and monitor permissions
- ✅ Offline fallback when permission is denied
- ✅ Works for storage, camera, location, microphone
- ✅ Detailed error reporting
Use Case #
Ideal for:
- Utility apps
- Security-conscious apps
- Apps requiring multi-permission handling
- Projects with offline fallback requirements
Installation #
Add this to your pubspec.yaml:
dependencies:
zeba_academy_permissions_handler:
git:
url: https://github.com/YourGitHubUsername/zeba_academy_permissions_handler.git
Then run:
flutter pub get
Usage #
import 'package:zeba_academy_permissions_handler/zeba_academy_permissions_handler.dart';
void checkCameraPermission() async {
final result = await ZebaPermissionService.handlePermission(
ZebaPermissionType.camera,
);
print(result.message);
if (result.isPermanentlyDenied) {
ZebaPermissionService.openSettings();
}
}
Supported Permissions #
| Permission | Description |
|---|---|
camera |
Access device camera |
microphone |
Access microphone |
storage |
Read/write storage |
location |
Access location |
Platform Setup #
Android #
Add the following to android/app/src/main/AndroidManifest.xml:
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
iOS #
Add the following to ios/Runner/Info.plist:
<key>NSCameraUsageDescription</key>
<string>This app needs camera access</string>
<key>NSMicrophoneUsageDescription</key>
<string>This app needs microphone access</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>This app needs location access</string>
About Me #
✨ I’m Sufyan bin Uzayr, an open-source developer passionate about building and sharing meaningful projects. You can learn more about me and my work at sufyanism.com or connect with me on LinkedIn.
Your all-in-one no-bloat hub! #
🚀 Explore cutting-edge resources in coding, tech, and development at zeba.academy and code.zeba.academy. Empower yourself with practical skills through curated directives, real-world projects, and hands-on experience. Level up your tech game today! 💻✨
Zeba Academy is a learning platform dedicated to coding, technology, and development.
➡ Visit our main site: zeba.academy ➡ Explore hands-on courses and resources at: code.zeba.academy ➡ Check out our YouTube tutorials: zeba.academy ➡ Follow us on Instagram: zeba.academy
Thank you for visiting!
License #
This project is licensed under the GNU General Public License v3.0 (GPL-3.0) - see the LICENSE file for details.