InputDecoration.collapsed constructor
- required String? 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,
- TextStyle? hintStyle,
- TextDirection? hintTextDirection,
- int? hintMaxLines,
- Duration? hintFadeDuration,
- bool maintainHintHeight = true,
- bool? filled = false,
- Color? fillColor,
- Color? focusColor,
- Color? hoverColor,
- InputBorder? border = InputBorder.none,
- bool enabled = true,
- 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;