Skip to content

Update predictive back docs - #13640

Merged
jesskuras merged 9 commits into
flutter:mainfrom
jesskuras:update-predictive-back-docs
Aug 1, 2026
Merged

Update predictive back docs#13640
jesskuras merged 9 commits into
flutter:mainfrom
jesskuras:update-predictive-back-docs

Conversation

@jesskuras

@jesskuras jesskuras commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Fixes #13604

Summary

Updates documentation across the site to reflect the current state of Android predictive back support (Android 14+ default enablement) and recent API migrations:

  • Primary Predictive Back Guide (platform-integration/android/predictive-back.md): Updated support status, documented Android manifest setup (enableOnBackInvokedCallback="true"), and added a usage example for PopScope with onPopInvokedWithResult(bool didPop, Object? result).
  • Breaking Changes Guide (release/breaking-changes/android-predictive-back.md): Updated code snippets from onPopInvoked to onPopInvokedWithResult and refactored the setup section to delegate to the primary predictive back guide to avoid duplication.
  • Navigation Index (ui/navigation/index.md): Replaced deprecated WillPopScope references with PopScope.
  • Add-to-App Android Fragment Docs (add-to-app/android/add-flutter-fragment.md): Added documentation and Kotlin/Java examples for configuring shouldAutomaticallyHandleOnBackPressed(true).

Staged pages

@jesskuras
jesskuras requested a review from parlough July 28, 2026 22:43
@jesskuras
jesskuras requested review from a team and sfshaza2 as code owners July 28, 2026 22:43

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the documentation for Android predictive back gesture support in Flutter, including instructions for FlutterFragment, PopScope migration, and related breaking changes. A typo was found in the breaking changes document where 'WithResult' was duplicated in a section header.

Comment thread sites/docs/src/content/release/breaking-changes/android-predictive-back.md Outdated
@flutter-website-bot

flutter-website-bot commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

Staged preview of the updated docs.flutter.dev site (updated for commit dc3a855):

https://flutter-docs-prod--docs-pr13640-update-predictive-back-3ae2ylff.web.app

@flutter-website-bot

flutter-website-bot commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

Staged preview of the updated flutter.dev site (updated for commit dc3a855):

https://flutter-dev-230821--www-pr13640-update-predictive-back-tmpj9jhe.web.app

@parlough
parlough requested a review from justinmc July 28, 2026 23:03
jesskuras and others added 2 commits July 30, 2026 15:02
…tive-back.md

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

@justinmc justinmc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one clarification below, otherwise looks good.

Comment thread sites/docs/src/content/platform-integration/android/predictive-back.md Outdated

@parlough parlough left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for tackling this @jesskuras!

Some suggestions and notes to consider. Feel free to take or leave them.

Comment thread sites/docs/src/content/release/breaking-changes/android-predictive-back.md Outdated
Comment thread sites/docs/src/content/release/breaking-changes/android-predictive-back.md Outdated
Comment thread sites/docs/src/content/release/breaking-changes/android-predictive-back.md Outdated
Comment thread sites/docs/src/content/release/breaking-changes/android-predictive-back.md Outdated
Comment thread sites/docs/src/content/platform-integration/android/predictive-back.md Outdated
Comment thread sites/docs/src/content/platform-integration/android/predictive-back.md Outdated
Comment thread sites/docs/src/content/release/breaking-changes/android-predictive-back.md Outdated

@justinmc justinmc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

Comment thread sites/docs/src/content/platform-integration/android/predictive-back.md Outdated
Comment thread sites/docs/src/content/add-to-app/android/add-flutter-fragment.md
@jesskuras

Copy link
Copy Markdown
Contributor Author

Checked with Gray and confirmed that last one looks correct. Thanks for the reviews!!

@jesskuras
jesskuras merged commit 0d4f897 into flutter:main Aug 1, 2026
13 checks passed
@jesskuras
jesskuras deleted the update-predictive-back-docs branch August 1, 2026 00:11
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.

Update Android predictive back and related docs

4 participants