EasyTabBar constructor

const EasyTabBar({
  1. Key? key,
  2. required List<Widget> tabs,
  3. VoidCallback? onTabChanged,
  4. int initialIndex = 0,
  5. List<Widget>? children,
})

Implementation

const EasyTabBar({
  super.key,
  required this.tabs,
  this.onTabChanged,
  this.initialIndex = 0,
  this.children,
})  :
      // if children is not null then tabs length must be equal to children length
      assert(children == null || tabs.length == children.length),
      // initial index must be less than tabs length
      assert(initialIndex < tabs.length);