init method

void init()

Implementation

void init() {
  // React to login state changes (no platform calls)
  _ref.listen<bool>(isLoggedInProvider, (prev, next) {
    if (next == true) _tryClaimStoredCode();
  });

  // If native links disabled (tests), stop here.
  if (!enabled) return;

  // Initial link (cold start)
  _handleInitialLink();

  // Foreground link stream
  _sub = appLinks.uriLinkStream.listen(
    _handleUri,
    onError: (e, st) => debugPrint('Deep link error: $e'),
  );
}