sessionNotifier property

ValueNotifier<Session?> get sessionNotifier

Provides a ValueNotifier for reactive session updates.

Use this with ValueListenableBuilder to reactively update your UI when the session changes.

Example:

ValueListenableBuilder<Session?>(
  valueListenable: authClient.sessionNotifier,
  builder: (context, session, _) {
    return session == null ? LoginPage() : HomePage();
  },
);

Implementation

ValueNotifier<Session?> get sessionNotifier => _sessionNotifier;