hasPermissions method

  1. @nonVirtual
Future<bool> hasPermissions()

Does this device manager have the permissions to run?

Implementation

@nonVirtual
Future<bool> hasPermissions() async {
  if (!_hasPermissions) {
    info(
        '$runtimeType - Checking permissions for device of type: $typeName and id: $id');
    _hasPermissions = true;

    // check any device-specific permission
    _hasPermissions = await onHasPermissions() && _hasPermissions;

    debug('$runtimeType - Permission of all permissions: $_hasPermissions');
  }
  return _hasPermissions;
}