Skip to content

refactor(superdeck): route image Hero flights through flightShuttleBuilder - #138

Merged
leoafarias merged 7 commits into
feat/automatic-image-hero-transitionsfrom
refactor/image-hero-shuttle-builder
Sep 28, 2026
Merged

leoafarias merged 7 commits into
feat/automatic-image-hero-transitionsfrom
refactor/image-hero-shuttle-builder

Conversation

@leoafarias

@leoafarias leoafarias commented Sep 25, 2026 •

Copy link
Copy Markdown
Collaborator

Intent

Route image Hero flights through Flutter's flightShuttleBuilder path so image transitions share the same Hero integration as text and code, with cross-fade logic owned by ImageHeroFlight.

Impacted package

  • superdeck

Changes

  • Added the ImageHeroFlight widget whose constructor is directly usable as Flutter's Hero shuttle builder.
  • Removed buildFlight callback plumbing and the old image flight function.
  • Preserved endpoint image reuse for resolved, decoded, and scaled image widgets, including their cross-fade when a shared URI has distinct pre-rendered endpoints.
  • Updated image Hero transition coverage for same-URI, cross-fade, and pre-built endpoint cases.
  • Documented continuous same-source flights and different-source cross-fades in the Markdown and deck-options references.
  • Updated the layout showcase image-treatment example to demonstrate a true full-bleed image with no margin or padding, and unified card styling, accent colors, footer contrast, and transition timing.

Verification

  • fvm dart run melos run build_runner:build
  • fvm dart run melos run analyze:dart
  • fvm flutter test test/src/ui/widgets/hero_element_test.dart test/src/ui/widgets/text_hero_flight_test.dart test/src/markdown/hero_transition_test.dart --reporter expanded (from packages/superdeck)
  • fvm dart analyze packages/superdeck
  • fvm flutter test packages/superdeck/test/src/ui/widgets
  • fvm flutter test packages/superdeck/test/src/markdown/hero_transition_test.dart --plain-name 'image Hero interpolates its constraint-derived block size'
  • fvm flutter test packages/superdeck/test/src/markdown/hero_transition_test.dart --plain-name 'image shuttle uses overlay bounds over stale block dimensions'
  • fvm flutter test packages/superdeck/test/src/markdown/hero_transition_test.dart --plain-name 'different image sources blend in both navigation directions'
  • Demo: fvm dart run tool/build_layout_showcase.dart and fvm flutter run -t lib/layout_showcase_main.dart -d macos; manually stepped across slides 3↔4 after a hot restart with no runtime exceptions.

fvm dart run melos run analyze completed Dart analysis but could not run DCM because the local DCM installation is not licensed.

@leoafarias
leoafarias added this pull request to stack #139 September 25, 2026 19:39
@github-actions

github-actions Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

Visit the preview URL for this PR (updated for commit 69c880a):

https://superdeck-dev--pr138-refactor-image-hero-ifwlt4oe.web.app

(expires Sun, 25 Oct 2026 22:01:02 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: bd68fc230762285849207e7e120aaf87cd4ca2f9

@leoafarias
leoafarias marked this pull request as ready for review September 25, 2026 22:07
@leoafarias
leoafarias merged commit 815a746 into main Sep 28, 2026
8 checks passed
@leoafarias
leoafarias deleted the refactor/image-hero-shuttle-builder branch September 28, 2026 01:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant