ZdsInputDecoration.withNoLabel constructor

ZdsInputDecoration.withNoLabel(
  1. {Widget? icon,
  2. String? helperText,
  3. TextStyle? helperStyle,
  4. int? helperMaxLines,
  5. String? hintText,
  6. TextStyle? hintStyle,
  7. TextDirection? hintTextDirection,
  8. int? hintMaxLines,
  9. String? errorText,
  10. TextStyle? errorStyle,
  11. int? errorMaxLines,
  12. FloatingLabelBehavior? floatingLabelBehavior,
  13. bool isCollapsed = false,
  14. bool? isDense,
  15. Widget? prefixIcon,
  16. BoxConstraints? prefixIconConstraints,
  17. Widget? prefix,
  18. String? prefixText,
  19. TextStyle? prefixStyle,
  20. Widget? suffixIcon,
  21. Widget? suffix,
  22. String? suffixText,
  23. TextStyle? suffixStyle,
  24. BoxConstraints? suffixIconConstraints,
  25. Widget? counter,
  26. String? counterText,
  27. TextStyle? counterStyle,
  28. bool? filled,
  29. Color? fillColor,
  30. Color? focusColor,
  31. Color? hoverColor,
  32. InputBorder? errorBorder,
  33. InputBorder? focusedBorder,
  34. InputBorder? focusedErrorBorder,
  35. InputBorder? disabledBorder,
  36. InputBorder? enabledBorder,
  37. InputBorder? border,
  38. bool enabled = true,
  39. String? semanticCounterText,
  40. bool? alignLabelWithHint,
  41. EdgeInsetsGeometry? contentPadding,
  42. EdgeInsets suffixPadding = const EdgeInsets.only(left: 12),
  43. 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,
  );
}