AuthStateChangeAction<T extends AuthState> constructor
AuthStateChangeAction<T extends AuthState> (
- void callback(
- BuildContext context,
- T state
An action that is called when auth state changes. You can capture any type of AuthState using this action.
For example, you can perform navigation after user has signed in:
SignInScreen(
actions: [
AuthStateChangeAction<SignedIn>((context, state) {
Navigator.pushReplacementNamed(context, '/home');
}),
],
);
Implementation
AuthStateChangeAction(this.callback);