feat: Add pop_until_with_result to Page#6347
Open
brunobrown wants to merge 2 commits intoflet-dev:mainfrom
Open
feat: Add pop_until_with_result to Page#6347brunobrown wants to merge 2 commits intoflet-dev:mainfrom
brunobrown wants to merge 2 commits intoflet-dev:mainfrom
Conversation
Add the Page.pop_until_with_result() method and ViewPopResultEvent to support popping multiple views and returning a result to the destination view — the Flet equivalent of Flutter's Navigator.popUntilWithResult. Fixes flet-dev#6326
Add animated GIF demonstrating the pop_until_with_result feature for the navigation-routing documentation assets.
fb53c21 to
69312d1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add
Page.pop_until_with_result()method andViewPopResultEventto support popping multiple views from the navigation stack and returning a result to the destination view — the Flet equivalent of Flutter'sNavigator.popUntilWithResult.Fixes #6326
Test Code
Type of change
Checklist
Screenshots
Additional details
page.update()syncs the view list and Flutter's Navigator rebuilds with correct transitions automaticallyexamples/apps/routing_navigation/pop_until_with_result.pyFiles changed
sdk/python/packages/flet/src/flet/controls/page.pyViewPopResultEvent,pop_until_with_result(),on_view_pop_result, unifiedbefore_eventsdk/python/packages/flet/src/flet/__init__.pyViewPopResultEventsdk/python/packages/flet/tests/test_pop_until_with_result.pysdk/python/examples/apps/routing_navigation/pop_until_with_result.pysdk/python/packages/flet/docs/assets/navigation-routing/pop-until-with-result-example.gifSummary by Sourcery
Add support for popping multiple views with a result and wire it into page navigation events.
New Features:
Tests: