PasswordConfirmModel constructor
PasswordConfirmModel({
- String prompt = 'Password: ',
- String confirmPrompt = 'Confirm password: ',
- String mismatchError = 'Passwords do not match',
- int minLength = 0,
- int maxLength = 0,
- String? validate()?,
- PasswordKeyMap? keyMap,
- 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,
);
}