We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
UserCreated
README
1 parent 0e3a7c4 commit bd1d5ecCopy full SHA for bd1d5ec
packages/firebase_ui_auth/README.md
@@ -44,15 +44,23 @@ class MyApp extends StatelessWidget {
44
Widget build(BuildContext context) {
45
final providers = [EmailAuthProvider()];
46
47
+ void onSignedIn() {
48
+ Navigator.pushReplacementNamed(context, '/profile');
49
+ }
50
+
51
return MaterialApp(
52
initialRoute: FirebaseAuth.instance.currentUser == null ? '/sign-in' : '/profile',
53
routes: {
54
'/sign-in': (context) {
55
return SignInScreen(
56
providers: providers,
57
actions: [
58
+ AuthStateChangeAction<UserCreated>((context, state) {
59
+ // Put any new user logic here
60
+ onSignedIn();
61
+ }),
62
AuthStateChangeAction<SignedIn>((context, state) {
- Navigator.pushReplacementNamed(context, '/profile');
63
64
}),
65
],
66
);
0 commit comments