Skip to content
pubscout

scroll_to_hide

2.3.0, released 6 months ago by pdfcrafter.app

A Flutter widget that hides or shows any child when the user scrolls.

WASM-ready
$ flutter pub add scroll_to_hide
Source repository

What it does

A small Flutter widget for hiding or showing any child (like navigation bars or headers) when the user scrolls. It supports vertical and horizontal hide animations, manual controls via a controller, and route-pop restoration.

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

Use it when

  • You want to hide a bottom navigation bar or header on reverse scroll and show it on forward scroll.
  • You need vertical or horizontal hide animations bound to a ScrollController.
  • You want to manually control visibility or restore state on route pop.

Skip it when

  • You are not using a scrollable widget with a ScrollController.
  • You need a complex layout system unrelated to scroll-driven visibility.

Strengths

  • Supports both vertical and horizontal hide directions.
  • Provides a ScrollToHideController for manual show, hide, toggle, and state reads.
  • Includes optional RouteObserver support to restore visibility when returning from a pushed route.

Weaknesses

  • Requires sharing the exact ScrollController attached to the scrollable.
  • Manual height or width sizing may be required for stable shown dimensions.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
0
ScrollToHide(
  scrollController: _scrollController,
  height: 72,
  child: BottomNavigationBar(
    items: const [
      BottomNavigationBarItem(icon: Icon(Icons.home), label: 'Home'),
      BottomNavigationBarItem(icon: Icon(Icons.settings), label: 'Settings'),
    ],
  ),
)

Alternatives

Packages that do the same job and could replace scroll_to_hide.