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