PIT Permission

This is Permission Plugin, that can use for requesting permission in IOS or Android

Note: This plugin is still under development, and some Components might not be available yet or still has so many bugs.


First, add pit_permission as a dependency in your pubspec.yaml file.

pit_permission: ^0.0.2


You must add this permission in AndroidManifest.xml for Android

for using Camera = <uses-permission android:name="android.permission.CAMERA"/>
for using Microphone = <uses-permission android:name="android.permission.RECORD_AUDIO"/>
for read Storage = <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
for read Contact = <uses-permission android:name="android.permission.READ_CONTACTS"/>
for using Location = <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>

And you must add this on info.plist for IOS

For using camera

 <string>${PRODUCT_NAME} Need To Access Your Camera</string>

For using microphone

 <string>${PRODUCT_NAME} Need To Access Your Microphone</string>

For read storage

 <string>${PRODUCT_NAME} Need To Access Your Photo</string>

For read contact

 <string>${PRODUCT_NAME} Need To Access Your Contact</string>

For using location

    <string>${PRODUCT_NAME} Need To Access Your Location</string>
    <string>${PRODUCT_NAME} Need To Access Your Location</string>

Example for Check Permission

bool isPermissionGranted = await PitPermission.checkPermission(PermissionName.microphone);

Example for Request Single Permission

bool cameraGranted = await PitPermission.requestSinglePermission(PermissionName.camera);

Example for Request Permissions

 List<PermissionName> permissionNameList = [

 Map<PermissionName, bool> grantedList; = await PitPermission.requestPermissions(permissionNameList);