flutter/examples/api/test/widgets
Mitchell Goodwin d877d2875e
Allow mixing route transitions in one app. (#150031)
Fixes #33799

Allows for a route to inform the route below it in the navigation stack how to animate when the topmost route enters are leaves the stack.

It does this by making a `DelegatedTransition` available for the previous route to look up and use. If available, the route lower in the stack will wrap it's transition builders with that delegated transition and use it instead of it's default secondary transition.

This is what the sample code in this PR shows an app that is able to use both a Material zoom transition and a Cupertino slide transition in one app. It also includes a custom vertical transition. Every page animates off the screen in a way to match up with the incoming page's transition. When popped, the correct transitions play in reverse.

https://github.com/user-attachments/assets/1fc910fa-8cde-4e05-898e-daad8ff4a697

The below video shows this logic making a pseudo iOS styled sheet transition.

https://github.com/flutter/flutter/assets/58190796/207163d8-d87f-48b1-aad9-7e770d1d96c5

All existing page transitions in Flutter will be overwritten by the incoming route if a `delegatedTransition` is provided. This can be opted out of through `canTransitionTo` for a new route widget. Of Flutter's existing page transitions, this PR only adds a `DelegatedTransition` for the Zoom and Cupertino transitions. The other transitions possible in Material will get delegated transitions in a later PR.
2024-10-02 20:08:11 +00:00
..
actions Add tests for action_listener.0.dart (#150606) 2024-07-08 06:12:22 +00:00
animated_grid Add SliverAnimatedGrid and AnimatedGrid (#112982) 2022-10-07 22:15:11 +00:00
animated_list Feature: Add AnimatedList with separators (#144899) 2024-06-05 15:20:07 +00:00
animated_size Add test for animated_size.0.dart API example. (#147828) 2024-05-10 21:55:51 +00:00
animated_switcher Add tests for animated_switcher.0.dart API example. (#149180) 2024-05-29 12:10:34 +00:00
app Rename Sample classes (#124080) 2023-04-04 20:34:29 +00:00
app_lifecycle_listener Fix typo (#141426) 2024-01-11 17:05:01 -08:00
async Add test for future_builder.0.dart (#148453) 2024-05-27 07:12:56 +00:00
autocomplete Test raw autocomplete api examples (#148234) 2024-05-23 08:52:13 +00:00
basic Remove double MaterialApp wrap from api samples (#150055) 2024-06-12 05:22:23 +00:00
binding Add AppLifecycleListener, with support for application exit handling (#123274) 2023-06-08 22:57:19 +00:00
color_filter Add tests for color_filtered.0.dart example. (#151064) 2024-07-05 20:33:20 +00:00
dismissible Add test for dismissible.0.dart API example. (#146723) 2024-04-19 19:21:08 +00:00
drag_target Add test for draggable.0.dart API example. (#147941) 2024-05-10 21:54:16 +00:00
draggable_scrollable_sheet Fixed a lot of typos (#141431) 2024-01-12 22:10:25 +00:00
editable_text Add tests for editable_text.on_changed.0.dart API example. (#148874) 2024-05-24 19:21:12 +00:00
focus_manager Add test for focus_node.0.dart API example. (#146943) 2024-04-23 20:32:07 +00:00
focus_scope Add test for focus example 2 (#147624) 2024-05-21 18:53:55 +00:00
focus_traversal Add tests for ordered_traversal_group.0.dart (#152849) 2024-08-06 02:28:25 +00:00
form Write Tests for API Example of form.0.dart (#142635) 2024-02-01 21:54:46 +00:00
framework Add test for error_widget.0_test.dart (#153103) 2024-08-26 18:11:02 +00:00
gesture_detector Add tests for gesture_detector.0.dart and gesture_detector.1.dart API examples. (#146724) 2024-04-19 23:08:04 +00:00
hardware_keyboard Explain the "patching" protocol in KeyMessageManager.keyMessageHandler and add an example (#105280) 2022-07-26 05:42:05 +00:00
heroes Dev, examples/api, etc updated for Material 3 by default (#129683) 2023-06-28 09:41:58 -07:00
image Add test for image.error_builder.0.dart API example. (#148497) 2024-05-20 16:11:20 +00:00
implicit_animations Add test for animated_fractionally_sized_box.0.dart API example. (#146721) 2024-05-01 16:03:12 +00:00
inherited_model InheritedModel: Add a complete interactive example and update snippet for null safety (#104174) 2022-05-30 06:13:10 -07:00
inherited_notifier Add test for inherited_notifier.0.dart (#150344) 2024-06-20 17:55:07 +00:00
inherited_theme Add test for inherited_theme.0.dart (#149120) 2024-05-29 20:05:25 +00:00
interactive_viewer Update example code and docs for InteractiveViewer.builder (#98623) 2022-02-16 17:25:17 -08:00
layout_builder Rename Sample classes (#124080) 2023-04-04 20:34:29 +00:00
magnifier Enhances intuitiveness of RawMagnifier's example (#150308) 2024-07-19 14:09:18 +00:00
navigator Add tests for navigator.0.dart (#150034) 2024-06-14 06:39:14 +00:00
navigator_pop_handler Nested Navigator state restoration predictive back examples (#153723) 2024-08-22 03:40:09 +00:00
nested_scroll_view Adds tests to NestedScrollView examples (#148170) 2024-05-21 16:35:04 +00:00
overflow_bar Added missing tests for OverflowBar example. (#146780) 2024-04-16 22:10:56 +00:00
overlay Optimize Overlay sample to avoid overflow (#155861) 2024-09-28 09:20:32 +00:00
page Refactors page API (#137792) 2024-05-13 22:45:51 +00:00
page_view Reland "Remove hack from PageView." (#142172) 2024-01-24 23:44:11 +00:00
pop_scope Reapply new PopScope API (#147607) 2024-05-07 09:04:49 -07:00
preferred_size Add test for preferred_size.0.dart API example. (#146725) 2024-04-19 19:08:07 +00:00
restoration_properties Add tests for restorable_value.0.dart API example. (#148676) 2024-05-23 08:34:23 +00:00
routes Allow mixing route transitions in one app. (#150031) 2024-10-02 20:08:11 +00:00
scroll_end_notification ScrollEndNotification example: auto-scroll based on RenderSliver constraints and geometry (#143538) 2024-07-02 18:46:19 +00:00
scroll_notification_observer Add ScrollNotificationObserver sample (#127023) 2023-05-25 15:58:52 +00:00
scroll_position Scrollbar thumb drag gestures now produce one start and one end scroll notification (#146654) 2024-06-04 22:02:12 +00:00
scroll_view Test of CustomScrollViewExampleApp (#152431) 2024-08-23 06:57:28 +00:00
scrollbar Add an example for how to hide default scrollbar on desktop platform. (#108542) 2022-08-18 13:09:23 +00:00
shared_app_data Add tests for shared_app_data.#.dart API examples. (#147830) 2024-05-20 17:49:04 +00:00
shortcuts Add tests for logical_key_set.0.dart API example. (#147735) 2024-05-20 17:47:10 +00:00
single_child_scroll_view Add tests for SingleChildScrollView examples (#153548) 2024-08-21 09:45:32 +00:00
sliver PinnedHeaderSliver example based on the iOS Settings AppBar (#151205) 2024-07-03 20:06:16 +00:00
sliver_fill test sliver fill remaining examples (#148041) 2024-05-13 15:30:49 +00:00
slotted_render_object_widget Reland "Mixin for slotted RenderObjectWidgets and RenderBox (#94077)" (#94632) 2021-12-03 14:39:02 -08:00
system_context_menu Reland Native ios context menu (#143002) (#148238) (#148265) 2024-05-15 18:37:05 +00:00
table Added missing tests for Table api example table.0.dart. (#147318) 2024-04-26 21:30:17 +00:00
tap_region Replace FocusTrap with TapRegionSurface (#107262) 2022-07-29 16:00:07 +00:00
text Add one DefaultTextStyle example (#122182) 2023-03-08 20:40:54 +00:00
text_magnifier Disable flaky golden file test (#144351) 2024-02-28 18:10:50 -06:00
transitions Test remaining transitions api examples (#148302) 2024-05-23 18:57:14 +00:00
tween_animation_builder Add tests for tween_animation_builder.0.dart API example. (#148902) 2024-05-30 20:17:04 +00:00
undo_history Add test for undo_history_controller.0.dart (#148205) 2024-05-21 22:19:04 +00:00
value_listenable_builder Fix duplicate MaterialApp in api example test (#154550) 2024-09-04 06:38:33 +00:00
widget_state Add WidgetStateMouseCursor example and tests for it. (#155552) 2024-10-01 23:15:53 +00:00
navigator_utils.dart Reland root predictive back (#132249) 2023-08-17 23:55:05 +00:00