repeatPassword property

TextFieldState repeatPassword
latefinal

TextFieldState of a repeat password text input.

Implementation

late final TextFieldState repeatPassword = TextFieldState(
  onFocus: (s) {
    password.error.value = null;

    if (s.text != password.text && password.isValidated) {
      s.error.value = 'err_passwords_mismatch'.l10n;
    }
  },
  onSubmitted: (s) async {
    switch (page.value) {
      case IntroductionStage.accountCreating:
        await createAccount();
        break;

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