ScrollController constructor

ScrollController(
  1. {double initialScrollOffset = 0.0,
  2. bool keepScrollOffset = true,
  3. String? debugLabel,
  4. ScrollControllerCallback? onAttach,
  5. ScrollControllerCallback? onDetach}
)

Creates a controller for a scrollable widget.

The values of initialScrollOffset and keepScrollOffset must not be null.

Implementation

ScrollController({
  double initialScrollOffset = 0.0,
  this.keepScrollOffset = true,
  this.debugLabel,
  this.onAttach,
  this.onDetach,
}) : _initialScrollOffset = initialScrollOffset;