ButtonBar constructor Null safety

const ButtonBar(
  1. {Key? key,
  2. MainAxisAlignment? alignment,
  3. MainAxisSize? mainAxisSize,
  4. ButtonTextTheme? buttonTextTheme,
  5. double? buttonMinWidth,
  6. double? buttonHeight,
  7. EdgeInsetsGeometry? buttonPadding,
  8. bool? buttonAlignedDropdown,
  9. ButtonBarLayoutBehavior? layoutBehavior,
  10. VerticalDirection? overflowDirection,
  11. double? overflowButtonSpacing,
  12. List<Widget> children}
)

Creates a button bar.

Both buttonMinWidth and buttonHeight must be non-negative if they are not null.

Implementation

const ButtonBar({
  Key? key,
  this.alignment,
  this.mainAxisSize,
  this.buttonTextTheme,
  this.buttonMinWidth,
  this.buttonHeight,
  this.buttonPadding,
  this.buttonAlignedDropdown,
  this.layoutBehavior,
  this.overflowDirection,
  this.overflowButtonSpacing,
  this.children = const <Widget>[],
}) : assert(buttonMinWidth == null || buttonMinWidth >= 0.0),
     assert(buttonHeight == null || buttonHeight >= 0.0),
     assert(overflowButtonSpacing == null || overflowButtonSpacing >= 0.0),
     super(key: key);