ConnectionError class final

The connection has failed with an error

Inheritance
Annotations
  • @immutable

Constructors

ConnectionError(Object error, StackTrace? stackTrace)
const

Properties

error Object
The error that occurred
final
hasError bool
Returns true if the connection has an error
no setterinherited
hashCode int
The hash code for this object.
no setteroverride
isConnected bool
Returns true if the connection is ready for use
no setterinherited
isTransitioning bool
Returns true if the connection is in a transitional state
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
serverInfo ServerInfo?
Returns the server info if connected, null otherwise
no setterinherited
stackTrace StackTrace?
The stack trace associated with the error
final

Methods

map<T>({required T onDisconnected(), required T onConnecting(), required T onConnected(ServerInfo serverInfo), required T onDisconnecting(), required T onError(Object error, StackTrace? stackTrace)}) → T
Maps the state to a value using the provided functions
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

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