PasswordConfirmModel class
A password confirmation component that asks for password twice.
Example
final confirm = PasswordConfirmModel(
prompt: 'Enter password: ',
confirmPrompt: 'Confirm password: ',
);
- Inheritance
-
- Object
- Model
- ViewComponent
- PasswordConfirmModel
Constructors
- PasswordConfirmModel({String prompt = 'Password: ', String confirmPrompt = 'Confirm password: ', String mismatchError = 'Passwords do not match', int minLength = 0, int maxLength = 0, String? validate(String)?, PasswordKeyMap? keyMap, PasswordStyles? styles})
- Creates a new password confirmation model.
Properties
- confirmPrompt → String
-
The prompt for confirmation.
final
- error → String?
-
Gets the current error.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- inConfirmPhase → bool
-
Gets whether we're in the confirmation phase.
no setter
- keyMap → PasswordKeyMap
-
Key bindings.
final
- maxLength → int
-
Maximum password length.
final
- minLength → int
-
Minimum password length.
final
- mismatchError → String
-
Error message when passwords don't match.
final
- prompt → String
-
The prompt for the first password.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- styles → PasswordStyles
-
Styles.
final
- validate → String? Function(String)?
-
Validation function.
final
Methods
-
init(
) → Cmd? -
Returns an optional command to execute on program startup.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
update(
Msg msg) → (PasswordConfirmModel, Cmd?) -
Updates the component state in response to a message.
override
-
view(
) → String -
Renders the current model state for display.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited