BackgroundStateReconnectionPolicy class
A reconnection policy that checks the application's lifecycle state before allowing reconnection. This prevents reconnection when the app is in the background to save battery and resources.
- Implemented types
Constructors
- BackgroundStateReconnectionPolicy({required LifecycleStateEmitter appLifecycleState})
- Creates a BackgroundStateReconnectionPolicy.
Properties
- appLifecycleState → LifecycleStateEmitter
-
The provider that gives the current app lifecycle state.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
canBeReconnected(
) → bool -
Determines whether the WebSocket should attempt to reconnect automatically.
override
-
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