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.
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.
- dot_curved_bottom_nav
An animated bottom navigation bar with a top edge that curves around a dot.
69Compare - material_table_view
Feature-rich data table widget for Flutter with virtualization and frozen columns.
65Compare - infinite_carousel
Carousel in flutter. Supports features like infinite looping, friction effect, multiple scroll physics and control over item anchor and velocity.
50Compare - table_sticky_headers
A two-dimensional table widget with both sticky headers and a sticky legend cell.
50Compare
Works with
Packages commonly used together with scrolls_to_top: ones it builds on, ones built on it, and its own family.