CLTextField.password constructor
CLTextField.password({})
Implementation
factory CLTextField.password({
Key? key,
required TextEditingController controller,
required String labelText,
bool isReadOnly = false,
bool isRequired = false,
bool isRounded = false,
bool isEnabled = true,
dynamic prefix,
dynamic suffix,
List<FormFieldValidator<String>>? validators,
bool isCompact = false,
}) {
Widget? toIconWidget(dynamic ic) {
if (ic == null) return null;
if (ic is IconData) return Icon(ic);
return ic as Widget;
}
return CLTextField(
key: key,
controller: controller,
labelText: labelText,
isObscured: true,
isReadOnly: isReadOnly,
isRequired: isRequired,
isRounded: isRounded,
isEnabled: isEnabled,
validators: validators,
prefixIcon: toIconWidget(prefix),
suffixIcon: toIconWidget(suffix),
isCompact: isCompact,
);
}