password property

TextFieldState password
latefinal

TextFieldState of a password text input.

Implementation

late final TextFieldState password = TextFieldState(
  onFocus: (s) => s.unsubmit(),
  onChanged: (_) {
    login.error.value = null;
    password.error.value = null;
    password.unsubmit();
    repeatPassword.error.value = null;
    repeatPassword.unsubmit();
  },
  onSubmitted: (s) async {
    switch (page.value) {
      case IntroductionStage.signInWithPassword:
        await signIn();
        break;

      case IntroductionStage.accountCreating:
        repeatPassword.focus.requestFocus();
        break;

      default:
        // No-op.
        break;
    }
  },
);