checkPermissions static method

Future<bool> checkPermissions({
  1. bool openSettings = false,
  2. bool performRequest = true,
})

check if device can handle making calls

openSettings - whether to auto open device settings on permission failure 'performRequest - whether or not to show the native permission request if no permissions

Implementation

static Future<bool> checkPermissions(
    {bool openSettings = false, bool performRequest = true}) async {
  final res = await _methodChannel.invokeMethod(
      _methodChannelCheckPermissions,
      {"openSettings": openSettings, "performRequest": performRequest});
  return res as bool;
}