ToolBarIconButton constructor

const ToolBarIconButton({
  1. Key? key,
  2. required String label,
  3. required Widget icon,
  4. VoidCallback? onPressed,
  5. required bool showLabel,
  6. String? tooltipMessage,
})

Builds an icon button suitable for the toolbar.

It essentially wraps a MacosIconButton with the appropriate toolbar styling.

If it overflows the available toolbar width, it becomes a ToolbarOverflowMenuItem.

If showLabel is set to false, the button looks similar to the "system control" toolbar item from Apple's design guidelines. If true, it replicates the "image button" toolbar item.

Implementation

const ToolBarIconButton({
  super.key,
  required this.label,
  required this.icon,
  this.onPressed,
  required this.showLabel,
  this.tooltipMessage,
});