build method
Builds the final widget for this display mode for this item. Sub-classes implement this to build the widget that is appropriate for the given display mode (in toolbar or overflowed).
Implementation
@override
Widget build(BuildContext context, ToolbarItemDisplayMode displayMode) {
Color color = MacosTheme.brightnessOf(context).resolve(
const Color.fromRGBO(0, 0, 0, 0.25),
const Color.fromRGBO(255, 255, 255, 0.25),
);
if (displayMode == ToolbarItemDisplayMode.inToolbar) {
return Padding(
padding: padding!,
child: Container(color: color, width: 1, height: 28),
);
} else {
return Padding(
padding: padding!,
child: Container(color: color, height: 1),
);
}
}