password static method
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,
}) {
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,
);
});
}