ToolBar constructor
const
ToolBar({
- Key? key,
- double height = _kToolbarHeight,
- Alignment alignment = Alignment.center,
- Widget? title,
- double titleWidth = _kTitleWidth,
- EdgeInsets padding = const EdgeInsets.symmetric(horizontal: 8, vertical: 4.0),
- BoxDecoration? decoration,
- Widget? leading,
- bool automaticallyImplyLeading = true,
- List<
ToolbarItem> ? actions, - bool centerTitle = false,
- 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,
});