Skip to content

YudizAndroidSunny/EasyPermissionHandler

 
 

Repository files navigation

Use this package to simplify the permission handling in your project

You can ask single permission like this :

MyPermissionHandler.askPermission(Permission.camera).then((value) async { if (value.isGranted) { //Whatever you want to do when permission is granted })); } else { MyPermissionHandler.showPermissionDialog(context, value.isPermanentlyDenied, Permission.camera, "Camera"); } });

And for asking the multiple permissions :

MyPermissionHandler.askPermissions([Permission.camera]).then((value) async { if (value) { //Whatever you want to do when permission is granted } else { MyPermissionHandler.showPermissionDialog(context, true, Permission.camera, AppStrings.bluetoothPermission); } });

Note : Do not forget to define permission in AndroidManifest.xml file for Android and info.plist file for iOS.

About

Flutter package for Permission Handling

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dart 58.0%
  • CMake 11.7%
  • Shell 8.8%
  • Objective-C 7.0%
  • Java 5.9%
  • C 4.8%
  • Other 3.8%