InputDecorationTheme constructor

const InputDecorationTheme(
  1. {TextStyle labelStyle,
  2. TextStyle helperStyle,
  3. int helperMaxLines,
  4. TextStyle hintStyle,
  5. TextStyle errorStyle,
  6. int errorMaxLines,
  7. @Deprecated('Use floatingLabelBehaviour instead. ' 'This feature was deprecated after v1.13.2.') bool hasFloatingPlaceholder: true,
  8. FloatingLabelBehavior floatingLabelBehavior: FloatingLabelBehavior.auto,
  9. bool isDense: false,
  10. EdgeInsetsGeometry contentPadding,
  11. bool isCollapsed: false,
  12. TextStyle prefixStyle,
  13. TextStyle suffixStyle,
  14. TextStyle counterStyle,
  15. bool filled: false,
  16. Color fillColor,
  17. Color focusColor,
  18. Color hoverColor,
  19. InputBorder errorBorder,
  20. InputBorder focusedBorder,
  21. InputBorder focusedErrorBorder,
  22. InputBorder disabledBorder,
  23. InputBorder enabledBorder,
  24. InputBorder border,
  25. bool alignLabelWithHint: false}
)

Creates a value for ThemeData.inputDecorationTheme that defines default values for InputDecorator.

The values of isDense, isCollapsed, filled, and border must not be null.

Implementation

const InputDecorationTheme({
  this.labelStyle,
  this.helperStyle,
  this.helperMaxLines,
  this.hintStyle,
  this.errorStyle,
  this.errorMaxLines,
  @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.isDense = false,
  this.contentPadding,
  this.isCollapsed = false,
  this.prefixStyle,
  this.suffixStyle,
  this.counterStyle,
  this.filled = false,
  this.fillColor,
  this.focusColor,
  this.hoverColor,
  this.errorBorder,
  this.focusedBorder,
  this.focusedErrorBorder,
  this.disabledBorder,
  this.enabledBorder,
  this.border,
  this.alignLabelWithHint = false,
}) : assert(isDense != null),
     assert(isCollapsed != null),
     assert(filled != null),
     assert(alignLabelWithHint != null),
     // ignore: deprecated_member_use_from_same_package
     assert(!(!hasFloatingPlaceholder && identical(floatingLabelBehavior, FloatingLabelBehavior.always)),
      'hasFloatingPlaceholder=false conflicts with FloatingLabelBehavior.always');