registerFlutterHook static method

void registerFlutterHook(
  1. RealtimeFlutterHook hook
)

Registers a platform/framework specific hook (e.g. Flutter).

Implementation

static void registerFlutterHook(RealtimeFlutterHook hook) {
  _flutterHook = hook;
  final current = _instance;
  if (current != null) {
    hook.afterConnect(current, true);
    if (current.isConnected) {
      hook.onConnected?.call(current);
    }
  }
}