MethodChannelFlutterV2ray class

An implementation of FlutterV2rayPlatform that uses method channels.

Inheritance

Constructors

MethodChannelFlutterV2ray()

Properties

eventChannel → EventChannel
The event channel for status updates.
final
hashCode → int
The hash code for this object.
no setterinherited
methodChannel → MethodChannel
The method channel used to interact with the native platform.
final
onStatusChanged → Stream<VlessStatus>
no setteroverride
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

cancelAutoDisconnect() → Future<void>
Cancels auto-disconnect - VPN stays connected indefinitely.
override
clearAutoDisconnectFlag() → Future<void>
Clears the auto-disconnect expired flag. Should be called after app has handled the expired state.
override
getAutoDisconnectTimestamp() → Future<int>
Gets the timestamp (milliseconds since epoch) when VPN was auto-disconnected.
override
getConnectedServerDelay(String url) → Future<int>
Measures delay/ping for the currently connected server.
override
getCoreVersion() → Future<String>
Gets the version of the underlying core (Xray).
override
getRemainingAutoDisconnectTime() → Future<int>
Gets current remaining time in seconds, or -1 if auto-disconnect not active.
override
getServerDelay({required String config, required String url}) → Future<int>
Measures delay/ping for a server configuration (when not connected).
override
initializeVless({required String notificationIconResourceType, required String notificationIconResourceName, required String providerBundleIdentifier, required String groupIdentifier}) → Future<void>
Initializes the VPN plugin with platform-specific configuration.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
requestPermission() → Future<bool>
Requests VPN permission from the user (Android).
override
startVless({required String remark, required String config, required String notificationDisconnectButtonName, List<String>? blockedApps, List<String>? bypassSubnets, List<String>? dnsServers, bool proxyOnly = false, bool showNotificationDisconnectButton = true, AutoDisconnect? autoDisconnect}) → Future<void>
Starts the VPN connection with the given configuration.
override
stopVless() → Future<void>
Stops the VPN connection.
override
toString() → String
A string representation of this object.
inherited
updateAutoDisconnectTime(int additionalSeconds) → Future<int>
Adds or subtracts time from auto-disconnect. Returns the new remaining time in seconds, or -1 if auto-disconnect not active.
override
wasAutoDisconnected() → Future<bool>
Checks if VPN was auto-disconnected while app was killed. Returns true if auto-disconnect expired, false otherwise.
override

Operators

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