VlessStatus class
Runtime status snapshot for the current proxy or VPN/tunnel session.
Platform implementations may send status events as legacy positional lists or as maps. VlessStatus.fromEvent accepts both shapes and converts them into this stable Dart model.
Constructors
- VlessStatus({int duration = 0, int uploadSpeed = 0, int downloadSpeed = 0, int upload = 0, int download = 0, String state = "DISCONNECTED", VlessConnectionState? connectionState})
- Creates a status snapshot.
- VlessStatus.fromEvent(Object? event)
-
Parses any supported status event payload.
factory
-
VlessStatus.fromList(List<
Object?> values) -
Parses the legacy positional EventChannel payload.
factory
-
VlessStatus.fromMap(Map<
Object?, Object?> map) -
Parses a map status payload from a native platform implementation.
factory
Properties
- connectionState → VlessConnectionState
-
Normalized state parsed from state.
final
- download → int
-
Total downloaded bytes reported by the native runtime.
final
- downloadSpeed → int
-
Current download speed reported by the native runtime.
final
- duration → int
-
Number of seconds reported by the native runtime since session start.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- state → String
-
Raw state string emitted by the platform backend.
final
- upload → int
-
Total uploaded bytes reported by the native runtime.
final
- uploadSpeed → int
-
Current upload speed reported by the native runtime.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toMap(
) → Map< String, Object> - Converts this status to the stable map shape used in tests and logs.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Static Methods
-
tryParse(
Object? event) → VlessStatus? -
Attempts to parse
eventand returnsnullfor unsupported shapes.