useScrollController function
Creates a ScrollController.
The controller is automatically disposed when the widget is unmounted.
Implementation
ScrollController useScrollController({
double initialScrollOffset = 0.0,
bool keepScrollOffset = true,
String? debugLabel,
}) {
final c = ScrollController(
initialScrollOffset: initialScrollOffset,
keepScrollOffset: keepScrollOffset,
debugLabel: debugLabel,
);
onBeforeUnmount(c.dispose);
return c;
}