password static method
- Key? key,
- required TextFieldState state,
- String? label,
- String? hint,
- required RxBool obscured,
- bool treatErrorAsStatus = true,
- TextStyle? style,
- AutocompleteKind autocomplete = AutocompleteKind.currentPassword,
Constructs a ReactiveTextField tuned best for password-type fields.
Implementation
static Widget password({
Key? key,
required TextFieldState state,
String? label,
String? hint,
required RxBool obscured,
bool treatErrorAsStatus = true,
TextStyle? style,
AutocompleteKind autocomplete = AutocompleteKind.currentPassword,
}) {
return Obx(() {
return ReactiveTextField(
key: key,
state: state,
label: label,
hint: hint,
floatingLabelBehavior: FloatingLabelBehavior.always,
trailing: Center(
child: SvgIcon(
obscured.value ? SvgIcons.visibleOff : SvgIcons.visibleOn,
),
),
obscure: obscured.value,
onSuffixPressed: obscured.toggle,
treatErrorAsStatus: treatErrorAsStatus,
textCapitalization: TextCapitalization.none,
style: style,
spellCheck: false,
autocomplete: autocomplete,
);
});
}