TabBarView constructor Null safety

const TabBarView(
  1. {Key? key,
  2. required List<Widget> children,
  3. TabController? controller,
  4. ScrollPhysics? physics,
  5. DragStartBehavior dragStartBehavior = DragStartBehavior.start,
  6. double viewportFraction = 1.0,
  7. Clip clipBehavior = Clip.hardEdge}
)

Creates a page view with one child per tab.

The length of children must be the same as the controller's length.

Implementation

const TabBarView({
  super.key,
  required this.children,
  this.controller,
  this.physics,
  this.dragStartBehavior = DragStartBehavior.start,
  this.viewportFraction = 1.0,
  this.clipBehavior = Clip.hardEdge,
}) : assert(children != null),
     assert(dragStartBehavior != null);