RealtimeFlutterHook class

Internal hook contract for Flutter platform integration.

Constructors

RealtimeFlutterHook({required Future<RealtimeStorageAdapter?> beforeConnect({RealtimeStorageAdapter? customStorage, required bool persistToDisk}), required void afterConnect(MongoRealtime client, bool autoLifecycle), void onConnected(MongoRealtime client)?, void onDisconnected(Object? error)?})
const

Properties

afterConnect → void Function(MongoRealtime client, bool autoLifecycle)
Called after the client instance is created to attach platform observers.
final
beforeConnect → Future<RealtimeStorageAdapter?> Function({RealtimeStorageAdapter? customStorage, required bool persistToDisk})
Called before the socket connection is opened to optionally prepare platform storage.
final
hashCode → int
The hash code for this object.
no setterinherited
onConnected → void Function(MongoRealtime client)?
Called when the client connects.
final
onDisconnected → void Function(Object? error)?
Called when the client disconnects.
final
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