InputDecorationTheme constructor Null safety

const InputDecorationTheme(
  1. {TextStyle? labelStyle,
  2. TextStyle? floatingLabelStyle,
  3. TextStyle? helperStyle,
  4. int? helperMaxLines,
  5. TextStyle? hintStyle,
  6. TextStyle? errorStyle,
  7. int? errorMaxLines,
  8. FloatingLabelBehavior floatingLabelBehavior = FloatingLabelBehavior.auto,
  9. FloatingLabelAlignment floatingLabelAlignment = FloatingLabelAlignment.start,
  10. bool isDense = false,
  11. EdgeInsetsGeometry? contentPadding,
  12. bool isCollapsed = false,
  13. Color? iconColor,
  14. TextStyle? prefixStyle,
  15. Color? prefixIconColor,
  16. TextStyle? suffixStyle,
  17. Color? suffixIconColor,
  18. TextStyle? counterStyle,
  19. bool filled = false,
  20. Color? fillColor,
  21. BorderSide? activeIndicatorBorder,
  22. BorderSide? outlineBorder,
  23. Color? focusColor,
  24. Color? hoverColor,
  25. InputBorder? errorBorder,
  26. InputBorder? focusedBorder,
  27. InputBorder? focusedErrorBorder,
  28. InputBorder? disabledBorder,
  29. InputBorder? enabledBorder,
  30. InputBorder? border,
  31. bool alignLabelWithHint = false,
  32. BoxConstraints? constraints}
)

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

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

Implementation

const InputDecorationTheme({
  this.labelStyle,
  this.floatingLabelStyle,
  this.helperStyle,
  this.helperMaxLines,
  this.hintStyle,
  this.errorStyle,
  this.errorMaxLines,
  this.floatingLabelBehavior = FloatingLabelBehavior.auto,
  this.floatingLabelAlignment = FloatingLabelAlignment.start,
  this.isDense = false,
  this.contentPadding,
  this.isCollapsed = false,
  this.iconColor,
  this.prefixStyle,
  this.prefixIconColor,
  this.suffixStyle,
  this.suffixIconColor,
  this.counterStyle,
  this.filled = false,
  this.fillColor,
  this.activeIndicatorBorder,
  this.outlineBorder,
  this.focusColor,
  this.hoverColor,
  this.errorBorder,
  this.focusedBorder,
  this.focusedErrorBorder,
  this.disabledBorder,
  this.enabledBorder,
  this.border,
  this.alignLabelWithHint = false,
  this.constraints,
}) : assert(isDense != null),
     assert(isCollapsed != null),
     assert(floatingLabelAlignment != null),
     assert(filled != null),
     assert(alignLabelWithHint != null);