scrolled<T> method

RegistryEntry<ScrollController> scrolled<T>({
  1. double? initialScrollOffset,
  2. bool? keepScrollOffset,
  3. String? debugLabel,
})

Implementation

RegistryEntry<ScrollController> scrolled<T>({
  double? initialScrollOffset,
  bool? keepScrollOffset,
  String? debugLabel,
}) {
  return this.initialized((context) {
    final result = ScrollController(
      initialScrollOffset: initialScrollOffset ?? 0.0,
      keepScrollOffset: keepScrollOffset ?? true,
      debugLabel: debugLabel,
    );
    return DisposedValue(
      value: result,
      dispose: () => result.dispose(),
    );
  });
}