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.

Implementation

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