SmartApiSocketHooks class

Global hooks for SmartApiSocket — same philosophy as SmartApiHooks: the package never hard-codes a specific auth/push/session package, so wire in whatever your app uses.

Constructors

SmartApiSocketHooks()

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

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

Static Properties

buildHandshakePayload ↔ FutureOr<Map<String, dynamic>> Function()?
Called right after the socket connects, to build the payload emitted as the "handshake" event (see SmartApiSocket.init's handshakeEvent) — e.g. {"id": userId, "device_token": fcmToken}.
getter/setter pair
onConnected ↔ void Function()?
Fired when the socket connects (before the handshake is sent).
getter/setter pair
onConnectError ↔ void Function(dynamic error)?
Fired when a connection attempt fails.
getter/setter pair
onDisconnected ↔ void Function()?
Fired when the socket disconnects.
getter/setter pair
onHandshakeAck ↔ void Function(dynamic error)?
Fired when the server acknowledges the handshake event (see SmartApiSocket.init's handshakeAckEvent).
getter/setter pair