PasswordConfirmModel constructor

PasswordConfirmModel({
  1. String prompt = 'Password: ',
  2. String confirmPrompt = 'Confirm password: ',
  3. String mismatchError = 'Passwords do not match',
  4. int minLength = 0,
  5. int maxLength = 0,
  6. String? validate(
    1. String
    )?,
  7. PasswordKeyMap? keyMap,
  8. PasswordStyles? styles,
})

Creates a new password confirmation model.

Implementation

PasswordConfirmModel({
  this.prompt = 'Password: ',
  this.confirmPrompt = 'Confirm password: ',
  this.mismatchError = 'Passwords do not match',
  this.minLength = 0,
  this.maxLength = 0,
  this.validate,
  PasswordKeyMap? keyMap,
  PasswordStyles? styles,
}) : keyMap = keyMap ?? PasswordKeyMap(),
     styles = styles ?? PasswordStyles.defaults() {
  _passwordInput = PasswordModel(
    prompt: prompt,
    minLength: minLength,
    maxLength: maxLength,
    validate: validate,
    keyMap: keyMap,
    styles: styles,
  );
  _confirmInput = PasswordModel(
    prompt: confirmPrompt,
    minLength: minLength,
    maxLength: maxLength,
    keyMap: keyMap,
    styles: styles,
  );
}