PasswordModel constructor

PasswordModel({
  1. String prompt = 'Password: ',
  2. String placeholder = '',
  3. PasswordEchoMode echoMode = PasswordEchoMode.mask,
  4. String maskChar = '*',
  5. int fixedMaskLength = 6,
  6. int minLength = 0,
  7. int maxLength = 0,
  8. bool showHelp = false,
  9. String? validate(
    1. String
    )?,
  10. PasswordKeyMap? keyMap,
  11. PasswordStyles? styles,
  12. CursorModel? cursor,
})

Creates a new password model.

Implementation

PasswordModel({
  this.prompt = 'Password: ',
  this.placeholder = '',
  this.echoMode = PasswordEchoMode.mask,
  this.maskChar = '*',
  this.fixedMaskLength = 6,
  this.minLength = 0,
  this.maxLength = 0,
  this.showHelp = false,
  this.validate,
  PasswordKeyMap? keyMap,
  PasswordStyles? styles,
  CursorModel? cursor,
}) : keyMap = keyMap ?? PasswordKeyMap(),
     styles = styles ?? PasswordStyles.defaults(),
     cursor = cursor ?? CursorModel();