secondaryBuilder property
The secondary widget to be displayed. If not provided, the default chevron down icon is displayed.
Example:
SplitButton(
child: Text('Split Button'),
// invoke [showFlyout] to show the flyout, or use the flyoutController
// to display a flyout with custom options
secondaryBuilder: (context, showFlyout, flyoutController) {
return IconButton(
icon: const ChevronDown(),
onPressed: showFlyout,
);
},
flyout: Container(
width: 200,
height: 200,
color: Colors.white,
),
),
See also:
- ChevronDown, the default icon used
- flyout, the widget to be displayed when the flyout is requested
Implementation
final SplitButtonSecondaryBuilder? secondaryBuilder;