Field.password constructor
Field.password(})
Field.password is a constructor that helps in managing password fields
Implementation
Field.password(
this.key, {
this.label,
String? value,
this.validator,
this.autofocus = false,
this.dummyData,
this.header,
this.footer,
this.titleStyle,
this.hidden = false,
bool viewable = false,
this.readOnly,
Function(dynamic value)? onChanged,
FieldStyleTextField? style,
}) : _value = value,
this.style = style ?? FieldStyleTextField.password() {
this.style = (this.style as FieldStyleTextField).copyWith(
passwordViewable: viewable,
keyboardType: TextInputType.visiblePassword,
obscureText: true,
obscuringCharacter: '*',
passwordVisible: viewable,
inputFormatters: [FilteringTextInputFormatter.deny(RegExp(r'\s'))],
);
setOnChanged(onChanged);
widget = NyFormTextField.fromField(this);
}