onStartupTask method
Implementation
@override
Future<void> onStartupTask() async {
FirebaseAuth.instance
.authStateChanges()
.map(_AuthState.of)
.distinct()
.asyncMap(_onAuthState)
.listen((_) {});
if (allowAnonymous) {
await FirebaseAuth.instance.signInAnonymously();
}
}