passwordSuffixIcon method
Implementation
IconButton? passwordSuffixIcon() {
return widget.formType == FormType.password
? IconButton(
icon: Icon(
_isPasswordVisible
? (widget.outlinedIcon
? Icons.visibility_outlined
: Icons.visibility)
: (widget.outlinedIcon
? Icons.visibility_off_outlined
: Icons.visibility_off),
color: widget.iconColor ?? widget.primaryColor,
),
onPressed: _togglePasswordVisibility, // Toggle visibility
)
: null;
}