currentUserProvider top-level property
The signed-in User, or null when signed out — or while the stored session is still loading.
A convenience view over betterAuthStateProvider with the same collapse
semantics as BetterAuthFlutter.onAuthChange: "still loading" and "signed
out" both read as null. Watch betterAuthStateProvider directly when you
need to tell those apart (so the sign-in screen does not flash on cold
start while the session loads).
Implementation
final Provider<User?> currentUserProvider = Provider<User?>(
(ref) => ref.watch(betterAuthStateProvider).value?.user,
);