useScrollController function

ScrollController useScrollController({
  1. double initialScrollOffset = 0.0,
  2. bool keepScrollOffset = true,
  3. String? debugLabel,
  4. List<Object?>? keys,
})

Creates ScrollController that will be disposed automatically.

See also:

Implementation

ScrollController useScrollController({
  double initialScrollOffset = 0.0,
  bool keepScrollOffset = true,
  String? debugLabel,
  List<Object?>? keys,
}) {
  return use(
    _ScrollControllerHook(
      initialScrollOffset: initialScrollOffset,
      keepScrollOffset: keepScrollOffset,
      debugLabel: debugLabel,
      keys: keys,
    ),
  );
}