first commit

This commit is contained in:
benjibennn
2023-12-27 16:10:09 +08:00
commit 4f35362cf9
370 changed files with 108340 additions and 0 deletions

View 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);