ZetaPasswordInput constructor
- Key? key,
- bool? rounded,
- String? initialValue,
- AutovalidateMode? autovalidateMode,
- ZetaFormFieldRequirement? requirementLevel = ZetaFormFieldRequirement.none,
- ValueChanged<
String?> ? onChange, - FormFieldSetter<
String> ? onSaved, - ValueChanged<
String?> ? onFieldSubmitted, - bool disabled = false,
- ZetaWidgetSize size = ZetaWidgetSize.medium,
- FormFieldValidator<
String> ? validator, - void onSubmit(
- String? val
- @Deprecated('Use disabled instead. ' 'This property has been renamed as of 0.11.2') bool enabled = true,
- TextEditingController? controller,
- String? hintText,
- String? errorText,
- String? label,
- String? placeholder,
- String? semanticLabel,
- String? obscureSemanticLabel,
- String? showSemanticLabel,
Constructs ZetaPasswordInput
Implementation
ZetaPasswordInput({
super.key,
bool? rounded,
super.initialValue,
super.autovalidateMode,
super.requirementLevel = ZetaFormFieldRequirement.none,
super.onChange,
super.onSaved,
super.onFieldSubmitted,
super.disabled = false,
this.size = ZetaWidgetSize.medium,
super.validator,
this.onSubmit,
@Deprecated('Use disabled instead. ' 'This property has been renamed as of 0.11.2') bool enabled = true,
super.controller,
this.hintText,
this.errorText,
this.label,
this.placeholder,
this.semanticLabel,
this.obscureSemanticLabel,
this.showSemanticLabel,
}) : super(
builder: (field) {
final _ZetaPasswordInputState state = field as _ZetaPasswordInputState;
return InternalTextInput(
size: size,
rounded: rounded,
controller: state.effectiveController,
hintText: hintText,
placeholder: placeholder,
label: label,
onChange: state.didChange,
requirementLevel: requirementLevel,
errorText: field.errorText ?? errorText,
onSubmit: onSubmit,
constrained: true,
disabled: disabled,
obscureText: state._obscureText,
semanticLabel: semanticLabel,
suffix: MergeSemantics(
child: Semantics(
label: state._obscureText ? showSemanticLabel : obscureSemanticLabel,
child: IconButton(
icon: ZetaIcon(state._obscureText ? ZetaIcons.visibility_off : ZetaIcons.visibility),
onPressed: state.toggleVisibility,
),
),
),
);
},
);