September 2019
Beginner
512 pages
12h 52m
English
Suppose our app needs permission to access contacts in order to make a favor request (for example, if we wanted to display all the contacts inside our app for the user to select one). We create the _checkPermissions function to check and request the permission, if needed, and follow these steps:
void _checkPermissions() async { PermissionStatus status = await PermissionHandler() .checkPermissionStatus(PermissionGroup.contacts);
if (status != PermissionStatus.granted)
Read now
Unlock full access