VpnDetector class

A utility to detect VPN status and react to connectivity changes.

Constructors

VpnDetector.new()
Creates a VpnDetector with default dependencies.
factory
VpnDetector.withDependencies({required Connectivity connectivity, required VpnDetectorPlatform platform})
Creates a VpnDetector with injected dependencies for testing.

Properties

hashCode int
The hash code for this object.
no setterinherited
onVpnStatusChanged Stream<VpnStatus>
A stream of VpnStatus that updates whenever the connectivity changes.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

isVpnActive() Future<VpnStatus>
Checks whether VPN is active, returning a VpnStatus.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited