AuthStateChangeAction<T extends AuthState> constructor

AuthStateChangeAction<T extends AuthState>(
  1. void callback(
    1. BuildContext context,
    2. 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);