Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Runtime Permission Tips on Flutter

Runtime Permission Tips on Flutter

This is a slide on potatotips 75.
「Runtime Permission Tips on Flutter」
#potatotips #flutterjp #flutter

Kenichi Kambara

August 12, 2021
Tweet

More Decks by Kenichi Kambara

Other Decks in Technology

Transcript

  1. About me •Mobile App Development •Speeches (e.g. 9 International confs.)

    •Writings (e.g. 5 Dev Books) •[Of fi cial] Evangelist at NTT TechnoCross •[Private] iplatform.org Kenichi Kambara (@korodroid)
  2. Here are some required steps for each OS Adding Permissions

    on AndroidManifest.xml etc. Adding Permissions on Info.plist & Pod fi le etc. Setup ref: https://pub.dev/packages/permission_handler 
  3. 1. Requesting Runtime Permission // e.g. Requesting microphone Permission var

    status = await Permission.microphone.request(); Result (example) - Granted - Denied - PermanentlyDenied - Restricted 
  4. 2. Con fi rming Runtime Permission status // e.g. Return

    value of checking await Permission.microphone.status.isGranted; await Permission.microphone.status.isDenied; await Permission.microphone.status.isPermanentlyDenied; await Permission.microphone.status.isRestricted; 
  5. 4. [Android] Supporting “Rationale” // for explaining why this app

    requires this permissio n if (await Permission.speech.shouldShowRequestRationale) { // show App’s Dialog } 
  6. Please let me know if you have any requests 


    such as technical speeches, technical writings and so on. Facebook:http://fb.com/kanbara.kenichi Twitter:@korodroid LinkedIn:http://www.linkedin.com/in/korodroid Thank you so much