TabSet constructor

TabSet({
  1. int defaultIndex = 0,
  2. required List<TabState> tabs,
})

Implementation

TabSet({this.defaultIndex = 0, required this.tabs})
    : assert(!tabs.any((tab) => tab.tabIndex == null),
          "No tabs index can be null"),
      assert(tabs.length >= defaultIndex, "defaultIndex must be in tabSet"),
      assert(tabs.map((t) => t.tabIndex).toSet().length == tabs.length,
          "Must have unique tabs");