Skip to content
pubscout

scrolls_to_top

2.1.1, released 3 years ago by optimist.dev

Widget that detects iOS status‑bar tap to trigger a scroll‑to‑top callback.

WASM-ready
$ flutter pub add scrolls_to_top
Source repository

What it does

Provides a ScrollsToTop widget that captures the iOS scroll‑to‑top gesture (status‑bar tap) and forwards it via an onScrollsToTop callback. It works with nested Scaffolds and a single main Navigator.

AI-written summary of version 2.1.1, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to distinguish the iOS status‑bar tap from other scroll events
  • Your app has multiple nested Scaffolds and wants a reliable scroll‑to‑top handler

Skip it when

  • Running on platforms other than iOS where the feature is irrelevant
  • Your app uses multiple Navigators and expects the tap to reach all of them

Strengths

  • Simple, declarative API
  • Works with nested Scaffold structures
  • Lightweight with no extra dependencies

Weaknesses

  • Only supports iOS scroll‑to‑top behavior
  • Does not work with multiple Navigators
  • No fallback for other platforms

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
0
ScrollsToTop(
  onScrollsToTop: _onScrollsToTop,
  scaffold: Scaffold(
    appBar: AppBar(title: const Text('Scroll to top')),
    body: Container(),
  ),
);

Alternatives

Packages that do the same job and could replace scrolls_to_top.

Works with

Packages commonly used together with scrolls_to_top: ones it builds on, ones built on it, and its own family.