first commit
This commit is contained in:
18
lib/auth/custom_auth/custom_auth_user_provider.dart
Normal file
18
lib/auth/custom_auth/custom_auth_user_provider.dart
Normal file
@@ -0,0 +1,18 @@
|
||||
import 'package:rxdart/rxdart.dart';
|
||||
|
||||
import 'custom_auth_manager.dart';
|
||||
|
||||
class NumstationAuthUser {
|
||||
NumstationAuthUser({required this.loggedIn, this.uid});
|
||||
|
||||
bool loggedIn;
|
||||
String? uid;
|
||||
}
|
||||
|
||||
/// Generates a stream of the authenticated user.
|
||||
BehaviorSubject<NumstationAuthUser> numstationAuthUserSubject =
|
||||
BehaviorSubject.seeded(NumstationAuthUser(loggedIn: false));
|
||||
Stream<NumstationAuthUser> numstationAuthUserStream() =>
|
||||
numstationAuthUserSubject
|
||||
.asBroadcastStream()
|
||||
.map((user) => currentUser = user);
|
||||
Reference in New Issue
Block a user