MacosSegmentedControl constructor

const MacosSegmentedControl({
  1. Key? key,
  2. required List<MacosTab> tabs,
  3. 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:

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);