Conversation
Deploying flet-examples with
|
| Latest commit: |
974fcfd
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://ad8089f5.flet-examples.pages.dev |
| Branch Preview URL: | https://hero.flet-examples.pages.dev |
Deploying flet-docs with
|
| Latest commit: |
974fcfd
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://f0a0a7a0.flet-docs.pages.dev |
| Branch Preview URL: | https://hero.flet-docs.pages.dev |
There was a problem hiding this comment.
Pull request overview
This pull request adds Hero animation support to Flet, enabling smooth shared-element transitions between routes. Hero animations are a common UI pattern where a control morphs and moves between screens during navigation, creating a visually appealing continuity effect.
Changes:
- Implements a new
Herocontrol withtag,content, andtransition_on_user_gesturesproperties - Adds comprehensive documentation with basic and gallery examples demonstrating Hero animations
- Includes type alias documentation for various helper types across the codebase
Reviewed changes
Copilot reviewed 30 out of 34 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| sdk/python/packages/flet/src/flet/controls/core/hero.py | Core Hero control implementation with tag validation and content visibility checks |
| packages/flet/lib/src/controls/hero.dart | Flutter/Dart Hero widget implementation with proper error handling |
| packages/flet/lib/src/flet_core_extension.dart | Registers Hero control in the Flet extension system |
| sdk/python/packages/flet/src/flet/init.py | Exports Hero and HeroTag for public API |
| sdk/python/examples/controls/hero/basic.py | Basic example demonstrating Hero animation between two views |
| sdk/python/examples/controls/hero/gallery.py | Advanced gallery example with multiple Hero-animated items |
| sdk/python/packages/flet/integration_tests/examples/core/test_hero.py | Integration tests with screenshot assertions and GIF generation |
| sdk/python/packages/flet/docs/controls/hero.md | Documentation page with examples and API reference |
| sdk/python/packages/flet/mkdocs.yml | Adds Hero to documentation navigation |
| sdk/python/packages/flet/docs/types/aliases.md | Adds HeroTag type alias documentation |
| sdk/python/packages/flet/src/flet/controls/types.py | Adds docstrings for Number, ResponsiveNumber, and IconDataOrControl type aliases |
| sdk/python/packages/flet/src/flet/controls/transform.py | Adds docstrings for RotateValue, ScaleValue, and OffsetValue type aliases |
| sdk/python/packages/flet/src/flet/controls/padding.py | Adds PaddingValue type alias documentation |
| sdk/python/packages/flet/src/flet/controls/margin.py | Adds MarginValue type alias documentation |
| sdk/python/packages/flet/src/flet/controls/keys.py | Adds KeyValue type alias documentation |
| sdk/python/packages/flet/src/flet/controls/duration.py | Adds DurationValue and DateTimeValue type alias documentation |
| sdk/python/packages/flet/src/flet/controls/control_state.py | Adds ControlStateValue type alias documentation |
| sdk/python/packages/flet/src/flet/controls/control_event.py | Adds documentation for EventControlType, ControlEventHandler, EventHandler, and ControlEvent |
| sdk/python/packages/flet/src/flet/controls/context.py | Adds documentation for the global context object |
| sdk/python/packages/flet/src/flet/controls/box.py | Adds BoxShadowValue type alias documentation |
| sdk/python/packages/flet/src/flet/controls/border_radius.py | Adds BorderRadiusValue type alias documentation |
| sdk/python/packages/flet/src/flet/controls/border.py | Adds BorderSideStrokeAlignValue type alias documentation |
| sdk/python/packages/flet/src/flet/controls/blur.py | Adds BlurValue type alias documentation |
| sdk/python/packages/flet/src/flet/controls/animation.py | Adds AnimationValue type alias documentation |
| sdk/python/packages/flet/src/flet/controls/material/tooltip.py | Adds TooltipValue type alias documentation |
| sdk/python/packages/flet/src/flet/controls/material/badge.py | Adds BadgeValue type alias documentation |
| sdk/python/packages/flet/src/flet/controls/cupertino/cupertino_timer_picker.py | Adds "Example:" label to code example for consistency |
| sdk/python/packages/flet/integration_tests/README.md | Adds bash language identifier to code blocks |
| sdk/python/packages/flet-cli/src/flet_cli/utils/distros.py | Reformats function signature and docstring for better readability |
| sdk/python/examples/apps/flet_build_test/pyproject.toml | Adds Flutter dependency override for local flet package development |
| sdk/python/packages/flet/integration_tests/examples/core/golden/macos/hero/basic_1.png | Golden image for initial home view |
| sdk/python/packages/flet/integration_tests/examples/core/golden/macos/hero/basic_2.png | Golden image for details view |
| sdk/python/packages/flet/integration_tests/examples/core/golden/macos/hero/basic.gif | Animated GIF demonstrating Hero transition |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
I noticed there is a (double) yellow line under text during transition. Can we do anything about that? Screen.Recording.2026-02-12.at.1.51.24.PM.mov |
… flet-color-pickers to extensions dep-group
|
Looks like a known issue: https://forum.itsallwidgets.com/t/why-does-a-yellow-horizontal-line-appear-under-the-text-component-during-the-hero-animation-transition/3059/3 Will push a fix. |
Fix #2438
Test code
Summary by Sourcery
Add a new Hero control with shared-element route animations and support it end-to-end across Python and Flutter, including documentation, examples, and tests.
New Features:
Enhancements:
Build:
Documentation:
Tests: