pageController method
PageController
pageController({})
Provides a way to easily get a copy of a PageController.
Implementation
PageController pageController({
int initialPage = 0,
bool keepPage = true,
double viewportFraction = 1.0,
void Function(ScrollPosition)? onAttach,
void Function(ScrollPosition)? onDetach,
}) {
return use.disposable(
() => PageController(
initialPage: initialPage,
keepPage: keepPage,
viewportFraction: viewportFraction,
onAttach: onAttach,
onDetach: onDetach,
),
(controller) => controller.dispose(),
[initialPage, keepPage, viewportFraction, onAttach, onDetach],
);
}