useTabController function Null safety

TabController useTabController(
  1. {required int initialLength,
  2. TickerProvider? vsync,
  3. int initialIndex = 0,
  4. List<Object?>? keys}
)

Creates and disposes a TabController.

See also:

Implementation

TabController useTabController({
  required int initialLength,
  TickerProvider? vsync,
  int initialIndex = 0,
  List<Object?>? keys,
}) {
  vsync ??= useSingleTickerProvider(keys: keys);

  return use(
    _TabControllerHook(
      vsync: vsync,
      length: initialLength,
      initialIndex: initialIndex,
      keys: keys,
    ),
  );
}