1
final status = await Permission.phone.request();
if (status == PermissionStatus.denied) {
    Fluttertoast.cancel();
    Fluttertoast.showToast(msg: 'Please enable permission to access phone call', toastLength: Toast.LENGTH_LONG);
}
if (status == PermissionStatus.permanentlyDenied) {
    Fluttertoast.cancel();
    openAppSettings();
    Fluttertoast.showToast(msg: 'Phone call permissions is permanently denied, we cannot request permissions.', toastLength: Toast.LENGTH_LONG);
}
if (status == PermissionStatus.granted) {
    print('Successfull);
}

D/permissions_handler(17117): No permissions found in manifest for: []8
D/ViewRootImplToast: hardware acceleration = true , fakeHwAccelerated = false, sRendererDisabled = false, forceHwAccelerated = false, sSystemRendererDisabled = false I/InputTransport(17117): Create ARC handle: 0x7a9894d140

git_gud
  • 649
  • 1
  • 11
  • 27

0 Answers0