MacosSegmentedControl constructor
const
MacosSegmentedControl({
- Key? key,
- required List<
MacosTab> tabs, - required MacosTabController controller,
Displays one or more navigational tabs in a single horizontal group.
Used by MacosTabView to navigate between the different tabs of the tab bar.
MacosSegmentedControl can be considered somewhat analogous to Flutter's
material TabBar
in that it requires a list of tabs
. Unlike TabBar
,
however, MacosSegmentedControl explicitly requires a controller
.
See also:
- MacosTab, which is a navigational item in a MacosSegmentedControl.
- MacosTabView, which is a multi-page navigational view.
tabs
and controller
must not be null. tabs
must contain at least one
tab.
Implementation
const MacosSegmentedControl({
super.key,
required this.tabs,
required this.controller,
}) : assert(tabs.length > 0);