usePageController function

PageController usePageController({
  1. int initialPage = 0,
  2. bool keepPage = true,
  3. double viewportFraction = 1.0,
  4. List<Object?>? keys,
})

Creates a PageController that will be disposed automatically.

See also:

Implementation

PageController usePageController({
  int initialPage = 0,
  bool keepPage = true,
  double viewportFraction = 1.0,
  List<Object?>? keys,
}) {
  return use(
    _PageControllerHook(
      initialPage: initialPage,
      keepPage: keepPage,
      viewportFraction: viewportFraction,
      keys: keys,
    ),
  );
}