ZdsInputDecoration.withNoLabel constructor
- {Widget? icon,
- String? helperText,
- TextStyle? helperStyle,
- int? helperMaxLines,
- String? hintText,
- TextStyle? hintStyle,
- TextDirection? hintTextDirection,
- int? hintMaxLines,
- String? errorText,
- TextStyle? errorStyle,
- int? errorMaxLines,
- FloatingLabelBehavior? floatingLabelBehavior,
- bool isCollapsed = false,
- bool? isDense,
- Widget? prefixIcon,
- BoxConstraints? prefixIconConstraints,
- Widget? prefix,
- String? prefixText,
- TextStyle? prefixStyle,
- Widget? suffixIcon,
- Widget? suffix,
- String? suffixText,
- TextStyle? suffixStyle,
- BoxConstraints? suffixIconConstraints,
- Widget? counter,
- String? counterText,
- TextStyle? counterStyle,
- bool? filled,
- Color? fillColor,
- Color? focusColor,
- Color? hoverColor,
- InputBorder? errorBorder,
- InputBorder? focusedBorder,
- InputBorder? focusedErrorBorder,
- InputBorder? disabledBorder,
- InputBorder? enabledBorder,
- InputBorder? border,
- bool enabled = true,
- String? semanticCounterText,
- bool? alignLabelWithHint,
- EdgeInsetsGeometry? contentPadding,
- EdgeInsets suffixPadding = const EdgeInsets.only(left: 12),
- EdgeInsets prefixPadding = const EdgeInsets.only(right: 12)}
An extension of InputDecoration that applies Zds styling with no label.
Implementation
factory ZdsInputDecoration.withNoLabel({
Widget? icon,
String? helperText,
TextStyle? helperStyle,
int? helperMaxLines,
String? hintText,
TextStyle? hintStyle,
TextDirection? hintTextDirection,
int? hintMaxLines,
String? errorText,
TextStyle? errorStyle,
int? errorMaxLines,
FloatingLabelBehavior? floatingLabelBehavior,
bool isCollapsed = false,
bool? isDense,
Widget? prefixIcon,
BoxConstraints? prefixIconConstraints,
Widget? prefix,
String? prefixText,
TextStyle? prefixStyle,
Widget? suffixIcon,
Widget? suffix,
String? suffixText,
TextStyle? suffixStyle,
BoxConstraints? suffixIconConstraints,
Widget? counter,
String? counterText,
TextStyle? counterStyle,
bool? filled,
Color? fillColor,
Color? focusColor,
Color? hoverColor,
InputBorder? errorBorder,
InputBorder? focusedBorder,
InputBorder? focusedErrorBorder,
InputBorder? disabledBorder,
InputBorder? enabledBorder,
InputBorder? border,
bool enabled = true,
String? semanticCounterText,
bool? alignLabelWithHint,
EdgeInsetsGeometry? contentPadding,
EdgeInsets suffixPadding = const EdgeInsets.only(left: 12),
EdgeInsets prefixPadding = const EdgeInsets.only(right: 12),
}) {
return ZdsInputDecoration(
icon: icon,
helperText: helperText,
helperStyle: helperStyle,
helperMaxLines: helperMaxLines,
hintText: hintText,
hintStyle: hintStyle,
hintTextDirection: hintTextDirection,
hintMaxLines: hintMaxLines,
errorText: errorText,
errorStyle: errorText != null && errorText.isEmpty ? const TextStyle(fontSize: 0, height: 0) : errorStyle,
errorMaxLines: errorMaxLines,
floatingLabelBehavior: floatingLabelBehavior,
isCollapsed: isCollapsed,
isDense: isDense,
prefixIcon: prefixIcon,
prefixIconConstraints: prefixIconConstraints,
prefix: prefix,
prefixText: prefixText,
prefixStyle: prefixStyle,
prefixPadding: prefixPadding,
suffixIcon: suffixIcon,
suffix: suffix,
suffixText: suffixText,
suffixStyle: suffixStyle,
suffixPadding: suffixPadding,
suffixIconConstraints: suffixIconConstraints,
counter: counter,
counterText: counterText,
counterStyle: counterStyle,
filled: filled,
fillColor: fillColor,
focusColor: focusColor,
hoverColor: hoverColor,
enabled: enabled,
semanticCounterText: semanticCounterText,
alignLabelWithHint: alignLabelWithHint,
disabledBorder: disabledBorder,
border: border,
focusedBorder: focusedBorder,
enabledBorder: enabledBorder,
contentPadding: contentPadding ?? const EdgeInsets.only(top: 27, bottom: 27),
errorBorder: errorBorder,
focusedErrorBorder: focusedErrorBorder,
);
}