Auto Task Assignment
This commit is contained in:
@@ -9,9 +9,11 @@ import 'supabase_provider.dart';
|
||||
|
||||
final currentUserIdProvider = Provider<String?>((ref) {
|
||||
final authState = ref.watch(authStateChangesProvider);
|
||||
return authState.maybeWhen(
|
||||
// Be explicit about loading/error to avoid dynamic dispatch problems.
|
||||
return authState.when(
|
||||
data: (state) => state.session?.user.id,
|
||||
orElse: () => ref.watch(sessionProvider)?.user.id,
|
||||
loading: () => ref.watch(sessionProvider)?.user.id,
|
||||
error: (_, __) => ref.watch(sessionProvider)?.user.id,
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user