InputDecoration.collapsed constructor

const InputDecoration.collapsed(
  1. {@required String hintText,
  2. @Deprecated('Use floatingLabelBehaviour instead. ' 'This feature was deprecated after v1.13.2.') bool hasFloatingPlaceholder: true,
  3. FloatingLabelBehavior floatingLabelBehavior: FloatingLabelBehavior.auto,
  4. TextStyle hintStyle,
  5. bool filled: false,
  6. Color fillColor,
  7. Color focusColor,
  8. Color hoverColor,
  9. InputBorder border: InputBorder.none,
  10. bool enabled: true}
)

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

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

Sets the isCollapsed property to true.

Implementation

const InputDecoration.collapsed({
  @required this.hintText,
  @Deprecated(
    'Use floatingLabelBehaviour instead. '
    'This feature was deprecated after v1.13.2.'
  )
  // ignore: deprecated_member_use_from_same_package
  this.hasFloatingPlaceholder = true,
  this.floatingLabelBehavior = FloatingLabelBehavior.auto,
  this.hintStyle,
  this.filled = false,
  this.fillColor,
  this.focusColor,
  this.hoverColor,
  this.border = InputBorder.none,
  this.enabled = true,
}) : assert(enabled != null),
     // ignore: deprecated_member_use_from_same_package
     assert(!(!hasFloatingPlaceholder && identical(floatingLabelBehavior, FloatingLabelBehavior.always)),
      'hasFloatingPlaceholder=false conflicts with FloatingLabelBehavior.always'),
     icon = null,
     labelText = null,
     labelStyle = null,
     helperText = null,
     helperStyle = null,
     helperMaxLines = null,
     hintMaxLines = null,
     errorText = null,
     errorStyle = null,
     errorMaxLines = null,
     isDense = false,
     contentPadding = EdgeInsets.zero,
     isCollapsed = true,
     prefixIcon = null,
     prefix = null,
     prefixText = null,
     prefixStyle = null,
     prefixIconConstraints = null,
     suffix = null,
     suffixIcon = null,
     suffixText = null,
     suffixStyle = null,
     suffixIconConstraints = null,
     counter = null,
     counterText = null,
     counterStyle = null,
     errorBorder = null,
     focusedBorder = null,
     focusedErrorBorder = null,
     disabledBorder = null,
     enabledBorder = null,
     semanticCounterText = null,
     alignLabelWithHint = false;