InputDecoration.collapsed constructor

const InputDecoration.collapsed({
  1. required String? hintText,
  2. @Deprecated('Invalid parameter because a collapsed decoration has no label. ' 'This feature was deprecated after v3.24.0-0.1.pre.') FloatingLabelBehavior? floatingLabelBehavior,
  3. @Deprecated('Invalid parameter because a collapsed decoration has no label. ' 'This feature was deprecated after v3.24.0-0.1.pre.') FloatingLabelAlignment? floatingLabelAlignment,
  4. TextStyle? hintStyle,
  5. TextDirection? hintTextDirection,
  6. int? hintMaxLines,
  7. Duration? hintFadeDuration,
  8. bool maintainHintHeight = true,
  9. bool? filled = false,
  10. Color? fillColor,
  11. Color? focusColor,
  12. Color? hoverColor,
  13. InputBorder? border = InputBorder.none,
  14. bool enabled = true,
  15. BoxConstraints? constraints,
})

Defines an InputDecorator that is the same size as the input field.

This type of input decoration does not include a border by default.

A collapsed decoration cannot have labelText, errorText, counter, icon, prefixes, and suffixes.

Sets the isCollapsed property to true. Sets the contentPadding property to EdgeInsets.zero.

Implementation

const InputDecoration.collapsed({
  required this.hintText,
  @Deprecated(
    'Invalid parameter because a collapsed decoration has no label. '
    'This feature was deprecated after v3.24.0-0.1.pre.',
  )
  FloatingLabelBehavior? floatingLabelBehavior,
  @Deprecated(
    'Invalid parameter because a collapsed decoration has no label. '
    'This feature was deprecated after v3.24.0-0.1.pre.',
  )
  FloatingLabelAlignment? floatingLabelAlignment,
  this.hintStyle,
  this.hintTextDirection,
  this.hintMaxLines,
  this.hintFadeDuration,
  this.maintainHintHeight = true,
  this.filled = false,
  this.fillColor,
  this.focusColor,
  this.hoverColor,
  this.border = InputBorder.none,
  this.enabled = true,
  this.constraints,
}) : icon = null,
     iconColor = null,
     label = null,
     labelText = null,
     labelStyle = null,
     floatingLabelStyle = null,
     helper = null,
     helperText = null,
     helperStyle = null,
     helperMaxLines = null,
     error = null,
     errorText = null,
     errorStyle = null,
     errorMaxLines = null,
     isDense = false,
     contentPadding = EdgeInsets.zero,
     isCollapsed = true,
     prefixIcon = null,
     prefix = null,
     prefixText = null,
     prefixStyle = null,
     prefixIconColor = null,
     prefixIconConstraints = null,
     suffix = null,
     suffixIcon = null,
     suffixText = null,
     suffixStyle = null,
     suffixIconColor = null,
     suffixIconConstraints = null,
     counter = null,
     counterText = null,
     counterStyle = null,
     errorBorder = null,
     focusedBorder = null,
     focusedErrorBorder = null,
     disabledBorder = null,
     enabledBorder = null,
     semanticCounterText = null,
     // ignore: prefer_initializing_formals, (can't use initializing formals for a deprecated parameter).
     floatingLabelBehavior = floatingLabelBehavior,
     // ignore: prefer_initializing_formals, (can't use initializing formals for a deprecated parameter).
     floatingLabelAlignment = floatingLabelAlignment,
     alignLabelWithHint = false;