PageControllerRaiiExt extension
Extension for managing PageController lifecycle.
Example:
class MyWidgetState extends State<MyWidget> with RaiiStateMixin {
late final pageController = PageController(initialPage: 0)
.withLifecycle(this, debugLabel: 'PageController');
}
Methods
-
withLifecycle(
RaiiLifecycleAware lifecycleAware, {String? debugLabel}) → PageController -
Available on PageController, provided by the PageControllerRaiiExt extension
Attaches this page controller to a RaiiLifecycleAware object for automatic disposal.