InputDecorator constructor Null safety

const InputDecorator(
  1. {Key? key,
  2. required InputDecoration decoration,
  3. TextStyle? baseStyle,
  4. TextAlign? textAlign,
  5. TextAlignVertical? textAlignVertical,
  6. bool isFocused = false,
  7. bool isHovering = false,
  8. bool expands = false,
  9. bool isEmpty = false,
  10. Widget? child}
)

Creates a widget that displays a border, labels, and icons, for a TextField.

The isFocused, isHovering, expands, and isEmpty arguments must not be null.

Implementation

const InputDecorator({
  Key? key,
  required this.decoration,
  this.baseStyle,
  this.textAlign,
  this.textAlignVertical,
  this.isFocused = false,
  this.isHovering = false,
  this.expands = false,
  this.isEmpty = false,
  this.child,
}) : assert(decoration != null),
     assert(isFocused != null),
     assert(isHovering != null),
     assert(expands != null),
     assert(isEmpty != null),
     super(key: key);