VlessMethodChannelAdapter class
Shared Flutter-channel backend with capability-gated, cancellable startup.
Federated implementations can extend this class instead of duplicating the wire protocol. Startup and options retain the contracts in VlessPlatform; native exceptions are surfaced to the caller without substituting a fallback runtime. Overridden methods inherit their platform contract documentation.
- Inheritance
-
- Object
- PlatformInterface
- VlessPlatform
- VlessMethodChannelAdapter
- Implementers
Constructors
- VlessMethodChannelAdapter({MethodChannel methodChannel = const MethodChannel('flutter_vless'), EventChannel eventChannel = const EventChannel('flutter_vless/status')})
- Creates an adapter, optionally substituting channels for a backend or test.
Properties
- eventChannel → EventChannel
-
Broadcast channel carrying native VlessStatus events.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- methodChannel → MethodChannel
-
Method channel used for native requests; injectable for adapter tests.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
clearQuickAccessProfile(
) → Future< void> -
Forgets native quick-access authorization without stopping an active VPN.
override
-
getCapabilities(
) → Future< VlessCapabilities> -
Reports implemented native options, control surfaces and OS policy state.
override
-
getConnectedServerDelay(
String url) → Future< int> -
Measures delay through the currently active runtime.
override
-
getCoreVersion(
) → Future< String> -
Returns the Xray core version reported by the platform backend.
override
-
getProviderDebugSnapshot(
) → Future< String> -
Returns a bounded native diagnostic snapshot for the current or most
recent VPN or proxy-only Xray runtime session.
override
-
getServerDelay(
{required String config, required String url, String? geoAssetsDirectory, String? certificateAssetsDirectory}) → Future< int> -
Measures delay for a provided Xray config.
override
-
initializeVless(
{required void onStatusChanged(VlessStatus status), required String notificationIconResourceType, required String notificationIconResourceName, required String providerBundleIdentifier, required String groupIdentifier, String? keychainAccessGroup, VlessOptions? options}) → Future< void> -
Initializes platform channels and native configuration.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
requestAddQuickTile(
) → Future< QuickTileAddResult> -
Requests Android's Add Quick Tile dialog from a supported foreground host.
override
-
requestPermission(
) → Future< bool> -
Requests the platform permission or profile state needed for tunnel mode.
override
-
startVless(
{required String remark, required String config, required String notificationDisconnectButtonName, List< String> ? blockedApps, List<String> ? bypassSubnets, bool proxyOnly = false, String? geoAssetsDirectory, String? certificateAssetsDirectory, AndroidDnsPolicy androidDnsPolicy = AndroidDnsPolicy.config, String? androidDnsProxyOutboundTag, VpnRoutingOptions? vpnRouting}) → Future<void> -
Starts a proxy-only or VPN/tunnel session with a JSON Xray config.
override
-
startVlessWithReport(
{required String remark, required String config, required String notificationDisconnectButtonName, List< String> ? blockedApps, List<String> ? bypassSubnets, bool proxyOnly = false, String? geoAssetsDirectory, String? certificateAssetsDirectory, AndroidDnsPolicy androidDnsPolicy = AndroidDnsPolicy.config, String? androidDnsProxyOutboundTag, VpnRoutingOptions? vpnRouting}) → Future<VlessPreparationReport> -
Starts with an optional safe report. Older third-party implementations
keep their existing start behavior and explicitly report unavailability.
override
-
stopVless(
) → Future< void> -
Stops the active proxy or VPN/tunnel session.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited