ToolBar constructor

const ToolBar({
  1. Key? key,
  2. double height = _kToolbarHeight,
  3. Alignment alignment = Alignment.center,
  4. Widget? title,
  5. double titleWidth = _kTitleWidth,
  6. EdgeInsets padding = const EdgeInsets.symmetric(horizontal: 8, vertical: 4.0),
  7. BoxDecoration? decoration,
  8. Widget? leading,
  9. bool automaticallyImplyLeading = true,
  10. List<ToolbarItem>? actions,
  11. bool centerTitle = false,
  12. Color? dividerColor,
})

Creates a toolbar in the MacosScaffold. The toolbar appears below the title bar (if present) of the macOS app or integrates with it.

A toolbar provides convenient access to frequently used commands and features (toolbar items).

Toolbar items include ToolBarIconButton, ToolBarPulldownButton, and ToolBarSpacer and CustomToolbarItem widgets, and should be provided via the items property.

The action of every toolbar item should also be provided as a menu bar command of your app.

The height of the ToolBar can be changed with height.

Implementation

const ToolBar({
  super.key,
  this.height = _kToolbarHeight,
  this.alignment = Alignment.center,
  this.title,
  this.titleWidth = _kTitleWidth,
  this.padding = const EdgeInsets.symmetric(horizontal: 8, vertical: 4.0),
  this.decoration,
  this.leading,
  this.automaticallyImplyLeading = true,
  this.actions,
  this.centerTitle = false,
  this.dividerColor,
});