Skip to content
pubscout

hero_here

2.4.0, released 3 weeks ago by igorkurilenko.dev

Hero animations on the same page without a Navigator or routes.

WASM-ready
$ flutter pub add hero_here
Source repository

What it does

Provides HeroHere and HeroHereSwitcher widgets to animate a widget from one place to another on the same screen. It uses tags and keys to coordinate the transition when state changes, without needing routes or a Navigator.

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

Use it when

  • You want shared element transitions between different positions on the same page.
  • You need tab indicator or sliding segmented control animations without route changes.

Skip it when

  • You are navigating between distinct routes and can use Flutter's built-in Hero widget.
  • You only need simple layout repositioning of a single widget without a second matching widget.

Strengths

  • Works on the same page with no Navigator or routes required.
  • Supports customizable flights, ready-made shuttles (crossfade, flip, scale), and redirect behaviors.
  • Works across all major platforms including web and desktop.

Weaknesses

  • Requires proper key and tag management between old and new places to trigger flights correctly.
  • Not intended for inter-route navigation transitions.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
0

No native setup or build runner required. Just add the dependency to pubspec.yaml.

HeroHereSwitcher(
  child: HeroHere(
    key: const ValueKey('center'),
    tag: 'flippers',
    child: Image.asset('images/flippers.png'),
  ),
)

Alternatives

Packages that do the same job and could replace hero_here.

  • heroine

    Spring-based physics hero transitions and gesture-driven animations in Flutter.

  • turn_page_transition

    Provides a simple page-turning transition effect for page routes and page views.

  • wolt_modal_sheet

    This package provides a responsive modal with multiple pages, motion animation for page transitions, and scrollable content within each page.

  • page_route_transition

    A Page Route Transition library that helps implement page transition animations.

Works with

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