SMSCodeRequestedAction constructor

SMSCodeRequestedAction(
  1. void callback(
    1. BuildContext context,
    2. AuthAction? action,
    3. Object flowKey,
    4. String phoneNumber,
    )
)

An action that is called when user requests a sign in with the phone number. Could be used to show a SMSCodeInputScreen or trigger a custom logic:

SignInScreen(
  actions: [
    SMSCodeRequestedAction((context, action, flowKey, phoneNumber) {
      Navigator.of(context).push(
        MaterialPageRoute(
          builder: (context) => SMSCodeInputScreen(),
        ),
      );
    }),
  ]
);

Implementation

SMSCodeRequestedAction(this.callback);