useScrollController function Null safety

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

Creates and disposes a ScrollController.

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,
    ),
  );
}