hasPermission method

FutureOr<bool> hasPermission (
  1. String permission
)

Android Check has permission Permission like android.permission.READ_PHONE_STATE

Implementation

static FutureOr<bool> hasPermission(String permission) async {
  if (!_isAndroid()) {
    return false;
  }
  return (await _channel.invokeMethod(
              'hasPermission', <String, dynamic>{'permission': permission}))
          as bool ??
      false;
}