ButtonTheme.bar constructor

ButtonTheme.bar({Key key, ButtonTextTheme textTheme: ButtonTextTheme.accent, double minWidth: 64.0, double height: 36.0, EdgeInsetsGeometry padding: const EdgeInsets.symmetric(horizontal: 8.0), ShapeBorder shape, bool alignedDropdown: false, Color buttonColor, Color disabledColor, Color highlightColor, Color splashColor, ColorScheme colorScheme, Widget child, ButtonBarLayoutBehavior layoutBehavior: ButtonBarLayoutBehavior.padded })

Creates a button theme that is appropriate for button bars, as used in dialog footers and in the headers of data tables.

This theme is denser, with a smaller minWidth and padding, than the default theme. Also, this theme uses ButtonTextTheme.accent rather than ButtonTextTheme.normal.

For best effect, the label of the button at the edge of the container should have text that ends up wider than 64.0 pixels. This ensures that the alignment of the text matches the alignment of the edge of the container.

For example, buttons at the bottom of Dialog or Card widgets use this button theme.

Implementation

ButtonTheme.bar({
  Key key,
  ButtonTextTheme textTheme = ButtonTextTheme.accent,
  double minWidth = 64.0,
  double height = 36.0,
  EdgeInsetsGeometry padding = const EdgeInsets.symmetric(horizontal: 8.0),
  ShapeBorder shape,
  bool alignedDropdown = false,
  Color buttonColor,
  Color disabledColor,
  Color highlightColor,
  Color splashColor,
  ColorScheme colorScheme,
  Widget child,
  ButtonBarLayoutBehavior layoutBehavior = ButtonBarLayoutBehavior.padded,
}) : assert(textTheme != null),
     assert(minWidth != null && minWidth >= 0.0),
     assert(height != null && height >= 0.0),
     assert(alignedDropdown != null),
     data = ButtonThemeData(
       textTheme: textTheme,
       minWidth: minWidth,
       height: height,
       padding: padding,
       shape: shape,
       alignedDropdown: alignedDropdown,
       layoutBehavior: layoutBehavior,
       buttonColor: buttonColor,
       disabledColor: disabledColor,
       highlightColor: highlightColor,
       splashColor: splashColor,
       colorScheme: colorScheme,
     ),
     super(key: key, child: child);