Skip to content

Predictive back route transitions by default#165832

Merged
auto-submit[bot] merged 56 commits intoflutter:masterfrom
justinmc:predictive-back-by-default-2
Aug 14, 2025
Merged

Predictive back route transitions by default#165832
auto-submit[bot] merged 56 commits intoflutter:masterfrom
justinmc:predictive-back-by-default-2

Conversation

@justinmc
Copy link
Contributor

@justinmc justinmc commented Mar 24, 2025

This PR turns on predictive back route transitions by default on supported Android devices.

With #154718, the default (PredictiveBackPageTransitionsBuilder) is the shared element transition. The full screen transition is also available by using PredictiveBackFullScreenPageTransitionsBuilder.

Original PR: #146788

Depends on: #154718

When this lands in stable, the docs should be updated: https://docs.flutter.dev/platform-integration/android/predictive-back

@justinmc justinmc self-assigned this Mar 24, 2025
@github-actions github-actions bot added framework flutter/packages/flutter repository. See also f: labels. f: material design flutter/packages/flutter/material repository. labels Mar 24, 2025
@justinmc justinmc marked this pull request as ready for review May 19, 2025 23:21
@justinmc justinmc requested a review from chunhtai May 19, 2025 23:21
@github-actions github-actions bot added the a: text input Entering text in a text field or keyboard related problems label May 20, 2025
@justinmc justinmc force-pushed the predictive-back-by-default-2 branch from 7aa3be6 to 11b05e4 Compare May 21, 2025 17:18
justinmc added 4 commits May 21, 2025 10:21
And get rid of all instances of _PredictiveBackPageTransition (old
name).
static const Map<TargetPlatform, PageTransitionsBuilder> _defaultBuilders =
<TargetPlatform, PageTransitionsBuilder>{
TargetPlatform.android: ZoomPageTransitionsBuilder(),
TargetPlatform.android: PredictiveBackPageTransitionsBuilder(),
Copy link
Contributor

Choose a reason for hiding this comment

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

will this be a breaking change? I am not too familiar with the process of changing page transition. so maybe @QuncCccccc can chime in.

An alternative is some how expose the predicitiveback enabled setting to framework side and conditionally return PredictiveBackPageTransitionsBuilder or ZoomPageTransitionsBuilder.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's actually what it does internally:

if (route.popGestureInProgress) {
return _PredictiveBackSharedElementPageTransition(
isDelegatedTransition: true,
animation: animation,
phase: phase,
secondaryAnimation: secondaryAnimation,
startBackEvent: startBackEvent,
currentBackEvent: currentBackEvent,
child: child,
);
}
return const FadeForwardsPageTransitionsBuilder().buildTransitions(
route,
context,
animation,
secondaryAnimation,
child,
);
},
);

So this PR moves us from Zoom to FadeForwards by default, and when doing a predictive back gesture, it will use the _PredictiveBackSharedElement transition by default.

Can you verify that we're good to make FadeForwards the default @QuncCccccc?

Copy link
Contributor

Choose a reason for hiding this comment

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

And it will always use that fallback aslong as you don't opt in in the AndroidManifest.xml, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes that's right.

Copy link
Contributor

Choose a reason for hiding this comment

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

Changing the default to FadeForwards sounds good to me! Thank you!

@chunhtai chunhtai requested a review from QuncCccccc May 22, 2025 19:28
@github-actions github-actions bot added d: api docs Issues with https://api.flutter.dev/ d: examples Sample code and demos labels May 22, 2025
@matanlurey
Copy link
Contributor

reason for revert: Breaks Linux_pixel_7pro embedded_android_views_integration_test:

[2025-08-14 16:01:17.600761] [STDOUT] stdout: [   +1 ms]   Expected: ''
[2025-08-14 16:01:17.600828] [STDOUT] stdout: [        ]     Actual: '[pointerCoord 0] x (expected: 473.0 actual: 472.990234375) [pointerCoord 1] x (expected: 370.0 actual: 369.990234375) [pointerCoord 2] x (expected: 809.0 actual: 808.990234375) , [pointerCoord 0] x (expected: 471.0 actual: 470.990234375) [pointerCoord 1] x (expected: 369.0 actual: 368.990234375) [pointerCoord 2] x (expected: 809.0 actual: 808.990234375) , [pointerCoord 0] x (expected: 470.0 actual: 468.990234375) [pointerCoord 1] x (expected: 368.0 actual: 366.990234375) [pointerCoord 2] x (expected: 809.0 actual: 807.990234375) , [pointerCoord 0] x (expected: 469.0 actual: 468.9052734375) [pointerCoord 1] x (expected: 367.0 actual: 366.9052734375) [pointerCoord 2] x (expected: 809.0 actual: 808.90625) , [pointerCoord 0] x (expected: 468.0 actual: 467.9052734375) [pointerCoord 1] x (expected: 366.0 actual: 365.9052734375) [pointerCoord 2] x (expected: 809.0 actual: 808.90625) , [pointerCoord 0] x (expected: 467.0 actual: 466.7294921875) [pointerCoord 1] x (expected: 365.0 actual: 364.7294921875) [pointerCoord 2] x (expected: 809.0 actual: 808.7294921875) , [pointerCoord 0] x (expected: 466.0 actual: 465.7294921875) [pointerCoord 1] x (expected: 365.0 actual: 364.7294921875) [pointerCoord 2] x (expected: 809.0 actual: 808.7294921875) , [pointerCoord 0] x (expected: 465.0 actual: 464.7294921875) [pointerCoord 1] x (expected: 364.0 actual: 363.7294921875) [pointerCoord 2] x (expected: 809.0 actual: 808.7294921875) , [pointerCoord 0] x (expected: 464.0 actual: 463.056640625) [pointerCoord 1] x (expected: 364.0 actual: 363.056640625) [pointerCoord 2] x (expected: 809.0 actual: 808.056640625) , [pointerCoord 0] x (expected: 464.0 actual: 463.056640625) [pointerCoord 1] x (expected: 364.0 actual: 363.056640625) , [pointerCoord 0] x (expected: 463.0 actual: 462.056640625) [pointerCoord 1] x (expected: 363.0 actual: 362.056640625) , [pointerCoord 0] x (expected: 461.0 actual: 458.234375) [pointerCoord 1] x (expected: 363.0 actual: 360.234375) , [pointerCoord 0] x (expected: 459.0 actual: 456.234375) [pointerCoord 1] x (expected: 363.0 actual: 360.234375) , [pointerCoord 0] x (expected: 457.0 actual: 454.234375) [pointerCoord 1] x (expected: 363.0 actual: 360.234375) , [pointerCoord 0] x (expected: 455.0 actual: 453.234375) [pointerCoord 1] x (expected: 363.0 actual: 361.234375) , [pointerCoord 0] x (expected: 453.0 actual: 449.234375) [pointerCoord 1] x (expected: 363.0 actual: 359.234375) , [pointerCoord 0] x (expected: 451.0 actual: 446.0302734375) [pointerCoord 1] x (expected: 363.0 actual: 358.0302734375) , [pointerCoord 0] x (expected: 449.0 actual: 444.0302734375) [pointerCoord 1] x (expected: 363.0 actual: 358.0302734375) , [pointerCoord 0] x (expected: 446.0 actual: 443.0302734375) [pointerCoord 1] x (expected: 363.0 actual: 360.0302734375) , [pointerCoord 0] x (expected: 446.0 actual: 443.0302734375) , [pointerCoord 0] x (expected: 443.0 actual: 440.0302734375) , [pointerCoord 0] x (expected: 440.0 actual: 433.4072265625) , [pointerCoord 0] x (expected: 436.0 actual: 431.4072265625) , [pointerCoord 0] x (expected: 432.0 actual: 427.4072265625) , [pointerCoord 0] x (expected: 428.0 actual: 417.2353515625) , [pointerCoord 0] x (expected: 424.0 actual: 413.2353515625) , [pointerCoord 0] x (expected: 419.0 actual: 412.2353515625) , [pointerCoord 0] x (expected: 415.0 actual: 408.2353515625) , [pointerCoord 0] x (expected: 409.0 actual: 398.2509765625) , [pointerCoord 0] x (expected: 404.0 actual: 393.2509765625) , [pointerCoord 0] x (expected: 398.0 actual: 372.5400390625) , [pointerCoord 0] x (expected: 392.0 actual: 371.5400390625) , [pointerCoord 0] x (expected: 384.0 actual: 363.5400390625) , [pointerCoord 0] x (expected: 374.0 actual: 345.8515625) '

Side-note: We should make this a presubmit test using an emulator if possible.

@matanlurey matanlurey added the revert Autorevert PR (with "Reason for revert:" comment) label Aug 14, 2025
auto-submit bot pushed a commit that referenced this pull request Aug 14, 2025
@auto-submit auto-submit bot removed the revert Autorevert PR (with "Reason for revert:" comment) label Aug 14, 2025
github-merge-queue bot pushed a commit that referenced this pull request Aug 15, 2025
…3809)

<!-- start_original_pr_link -->
Reverts: #165832
<!-- end_original_pr_link -->
<!-- start_initiating_author -->
Initiated by: matanlurey
<!-- end_initiating_author -->
<!-- start_revert_reason -->
Reason for reverting: Breaks `Linux_pixel_7pro
embedded_android_views_integration_test`:

-
https://ci.chromium.org/ui/p/flutter/builders/prod/Linux_pixel_7pro%20embedded_android_views_integration_test/8918/overview
-
https://ci.chromium.org/ui/p/flutter/builders/prod/Linux_pixel_7pro%20embedded_android_views_integration_test/8917/overview

```txt
[2025-08-14 16:01:17.600761] [STDOUT] stdout: [   +1 ms]   Expecte
<!-- end_revert_reason -->
<!-- start_original_pr_author -->
Original PR Author: justinmc
<!-- end_original_pr_author -->

<!-- start_reviewers -->
Reviewed By: {QuncCccccc}
<!-- end_reviewers -->

<!-- start_revert_body -->
This change reverts the following previous change:
This PR turns on predictive back route transitions by default on supported Android devices.

With #154718, the default (PredictiveBackPageTransitionsBuilder) is the [shared element transition](https://developer.android.com/design/ui/mobile/guides/patterns/predictive-back#shared-element-transition). The [full screen transition](https://developer.android.com/design/ui/mobile/guides/patterns/predictive-back#full-screen-surfaces) is also available by using PredictiveBackFullScreenPageTransitionsBuilder.

Original PR: #146788

Depends on: #154718

When this lands in stable, the docs should be updated: https://docs.flutter.dev/platform-integration/android/predictive-back
<!-- end_revert_body -->

Co-authored-by: auto-submit[bot] <[email protected]>
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 15, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 15, 2025
justinmc added a commit that referenced this pull request Aug 15, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 15, 2025
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Aug 15, 2025
flutter/flutter@f4334d2...52af7a5

2025-08-15 [email protected] Roll Packages from 09533b7 to 5c52c55 (6 revisions) (flutter/flutter#173854)
2025-08-15 [email protected] Roll Skia from 46ec77ae3954 to 5654ac32ede0 (1 revision) (flutter/flutter#173848)
2025-08-15 [email protected] Roll Skia from 162f47d6b6bd to 46ec77ae3954 (2 revisions) (flutter/flutter#173833)
2025-08-15 [email protected] Roll Dart SDK from c7faab270f27 to cc008dc8e7aa (2 revisions) (flutter/flutter#173826)
2025-08-15 [email protected] Roll Skia from ad5d04000101 to 162f47d6b6bd (5 revisions) (flutter/flutter#173822)
2025-08-15 [email protected] Update the RBE configuration for the recent Clang update (flutter/flutter#173803)
2025-08-15 [email protected] Stop writing legacy `FLUTTER_ROOT/version` file (by default?) (flutter/flutter#172793)
2025-08-15 [email protected] Remove `luci_flags.parallel_download_builds` and friends (flutter/flutter#173799)
2025-08-14 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Predictive back route transitions by default (#165832)" (flutter/flutter#173809)
2025-08-14 [email protected] Roll Skia from dca5f05fee87 to ad5d04000101 (8 revisions) (flutter/flutter#173798)
2025-08-14 [email protected] [web] Cleanup usages of deprecated `routeUpdated` message (flutter/flutter#173782)
2025-08-14 [email protected] Make sure that DataTable, DataColumn, DataRow, and DataCell don't crash in 0x0 environment (flutter/flutter#173515)
2025-08-14 [email protected] Make sure that a TableRowInkWell doesn't crash in 0x0 environment (flutter/flutter#173627)
2025-08-14 [email protected] Make sure that a DatePickerDialog doesn't crash in 0x0 environment (flutter/flutter#173677)
2025-08-14 [email protected] Return result of setting OpenGL contexts back to Flutter (flutter/flutter#173757)
2025-08-14 [email protected] Read `bin/cache/flutter.version.json` instead of `version` for `flutter_gallery` (flutter/flutter#173797)
2025-08-14 [email protected] Predictive back route transitions by default (flutter/flutter#165832)
2025-08-14 [email protected] feat: add onLongPressUp callback to InkWell widget (flutter/flutter#173221)
2025-08-14 [email protected] Roll Dart SDK from 214a7f829913 to c7faab270f27 (1 revision) (flutter/flutter#173792)
2025-08-14 [email protected] Add error handling for `Element` lifecycle user callbacks (flutter/flutter#173148)
2025-08-14 [email protected] Roll Fuchsia Linux SDK from I1TfNmsqTp7t3rO8e... to zWRpLglb48zC1vZLv... (flutter/flutter#173784)
2025-08-14 [email protected] [Range slider] Tap on active range,  the thumb closest to the mouse cursor should move to the cursor position. (flutter/flutter#173725)
2025-08-14 [email protected] Roll Packages from 6cb9113 to 09533b7 (4 revisions) (flutter/flutter#173789)
2025-08-14 [email protected] Implements the Android native stretch effect as a fragment shader (Impeller-only). (flutter/flutter#169293)
2025-08-14 [email protected] Sync `CHANGELOG.md` (3.35 -> `master`) (flutter/flutter#173790)
2025-08-14 [email protected] [VPAT][A11y] Announce Autocomplete search results status (flutter/flutter#173480)
2025-08-14 [email protected] Fix InputDecorator label padding (flutter/flutter#173344)
2025-08-14 [email protected] Fix default minimumSize in dropdownMenu when maximumSize is null (flutter/flutter#169438)
2025-08-14 [email protected] Thread sub-builders for every engine-uploading builder (flutter/flutter#173742)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC [email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
github-merge-queue bot pushed a commit that referenced this pull request Aug 15, 2025
ksokolovskyi pushed a commit to ksokolovskyi/flutter that referenced this pull request Aug 19, 2025
We need a robust way to get the duration of a route transition in tests,
so that tests can remain independent of the type of route transition and
its duration.

With this PR, this will be the canonical way to pump until a page
transition has finished:

```dart
testWidgets('example', (WidgetTester tester) async {
  final TransitionDurationObserver observer = TransitionDurationObserver();

  await tester.pumpWidget(
    MaterialApp(
      navigatorObservers: <NavigatorObserver>[observer],
      onGenerateRoute: (RouteSettings settings) { ... },
    ),
  );

  expect(find.text('Page 1'), findsOneWidget);
  expect(find.text('Page 2'), findsNothing);

  // Pump through the whole transition.
  await tester.tap(find.text('Next'));
  await observer.pumpPastTransition(tester);

  expect(find.text('Page 1'), findsNothing);
  expect(find.text('Page 2'), findsOneWidget);

  // Or, pump through part of a transition with the duration.
  await tester.tap(find.text('Back'));
  await tester.pump(observer.transitionDuration ~/ 2);

  expect(find.text('Page 1'), findsOneWidget);
  expect(find.text('Page 2'), findsOneWidget);
});
```

This was spun out of flutter#165832,
where updating the default route transition and its duration broke tests
in the framework, in customer tests, and in Google tests.

FYI @chrisbobbe

---------

Co-authored-by: Jing Shao <[email protected]>
ksokolovskyi pushed a commit to ksokolovskyi/flutter that referenced this pull request Aug 19, 2025
ksokolovskyi pushed a commit to ksokolovskyi/flutter that referenced this pull request Aug 19, 2025
For flutter#165832, picks up the test
change from zulip/zulip-flutter#1761 that was
bumped in the tests repo in flutter/tests#466.
ksokolovskyi pushed a commit to ksokolovskyi/flutter that referenced this pull request Aug 19, 2025
This PR turns on predictive back route transitions by default on
supported Android devices.

With flutter#154718, the default
(PredictiveBackPageTransitionsBuilder) is the [shared element
transition](https://developer.android.com/design/ui/mobile/guides/patterns/predictive-back#shared-element-transition).
The [full screen
transition](https://developer.android.com/design/ui/mobile/guides/patterns/predictive-back#full-screen-surfaces)
is also available by using
PredictiveBackFullScreenPageTransitionsBuilder.

Original PR: flutter#146788

Depends on: flutter#154718

When this lands in stable, the docs should be updated:
https://docs.flutter.dev/platform-integration/android/predictive-back
ksokolovskyi pushed a commit to ksokolovskyi/flutter that referenced this pull request Aug 19, 2025
…" (flutter#173809)

<!-- start_original_pr_link -->
Reverts: flutter#165832
<!-- end_original_pr_link -->
<!-- start_initiating_author -->
Initiated by: matanlurey
<!-- end_initiating_author -->
<!-- start_revert_reason -->
Reason for reverting: Breaks `Linux_pixel_7pro
embedded_android_views_integration_test`:

-
https://ci.chromium.org/ui/p/flutter/builders/prod/Linux_pixel_7pro%20embedded_android_views_integration_test/8918/overview
-
https://ci.chromium.org/ui/p/flutter/builders/prod/Linux_pixel_7pro%20embedded_android_views_integration_test/8917/overview

```txt
[2025-08-14 16:01:17.600761] [STDOUT] stdout: [   +1 ms]   Expecte
<!-- end_revert_reason -->
<!-- start_original_pr_author -->
Original PR Author: justinmc
<!-- end_original_pr_author -->

<!-- start_reviewers -->
Reviewed By: {QuncCccccc}
<!-- end_reviewers -->

<!-- start_revert_body -->
This change reverts the following previous change:
This PR turns on predictive back route transitions by default on supported Android devices.

With flutter#154718, the default (PredictiveBackPageTransitionsBuilder) is the [shared element transition](https://developer.android.com/design/ui/mobile/guides/patterns/predictive-back#shared-element-transition). The [full screen transition](https://developer.android.com/design/ui/mobile/guides/patterns/predictive-back#full-screen-surfaces) is also available by using PredictiveBackFullScreenPageTransitionsBuilder.

Original PR: flutter#146788

Depends on: flutter#154718

When this lands in stable, the docs should be updated: https://docs.flutter.dev/platform-integration/android/predictive-back
<!-- end_revert_body -->

Co-authored-by: auto-submit[bot] <[email protected]>
ksokolovskyi pushed a commit to ksokolovskyi/flutter that referenced this pull request Aug 19, 2025
WillBLogical pushed a commit to WillBLogical/packages that referenced this pull request Aug 20, 2025
flutter/flutter@f4334d2...52af7a5

2025-08-15 [email protected] Roll Packages from 09533b7 to 5c52c55 (6 revisions) (flutter/flutter#173854)
2025-08-15 [email protected] Roll Skia from 46ec77ae3954 to 5654ac32ede0 (1 revision) (flutter/flutter#173848)
2025-08-15 [email protected] Roll Skia from 162f47d6b6bd to 46ec77ae3954 (2 revisions) (flutter/flutter#173833)
2025-08-15 [email protected] Roll Dart SDK from c7faab270f27 to cc008dc8e7aa (2 revisions) (flutter/flutter#173826)
2025-08-15 [email protected] Roll Skia from ad5d04000101 to 162f47d6b6bd (5 revisions) (flutter/flutter#173822)
2025-08-15 [email protected] Update the RBE configuration for the recent Clang update (flutter/flutter#173803)
2025-08-15 [email protected] Stop writing legacy `FLUTTER_ROOT/version` file (by default?) (flutter/flutter#172793)
2025-08-15 [email protected] Remove `luci_flags.parallel_download_builds` and friends (flutter/flutter#173799)
2025-08-14 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Predictive back route transitions by default (#165832)" (flutter/flutter#173809)
2025-08-14 [email protected] Roll Skia from dca5f05fee87 to ad5d04000101 (8 revisions) (flutter/flutter#173798)
2025-08-14 [email protected] [web] Cleanup usages of deprecated `routeUpdated` message (flutter/flutter#173782)
2025-08-14 [email protected] Make sure that DataTable, DataColumn, DataRow, and DataCell don't crash in 0x0 environment (flutter/flutter#173515)
2025-08-14 [email protected] Make sure that a TableRowInkWell doesn't crash in 0x0 environment (flutter/flutter#173627)
2025-08-14 [email protected] Make sure that a DatePickerDialog doesn't crash in 0x0 environment (flutter/flutter#173677)
2025-08-14 [email protected] Return result of setting OpenGL contexts back to Flutter (flutter/flutter#173757)
2025-08-14 [email protected] Read `bin/cache/flutter.version.json` instead of `version` for `flutter_gallery` (flutter/flutter#173797)
2025-08-14 [email protected] Predictive back route transitions by default (flutter/flutter#165832)
2025-08-14 [email protected] feat: add onLongPressUp callback to InkWell widget (flutter/flutter#173221)
2025-08-14 [email protected] Roll Dart SDK from 214a7f829913 to c7faab270f27 (1 revision) (flutter/flutter#173792)
2025-08-14 [email protected] Add error handling for `Element` lifecycle user callbacks (flutter/flutter#173148)
2025-08-14 [email protected] Roll Fuchsia Linux SDK from I1TfNmsqTp7t3rO8e... to zWRpLglb48zC1vZLv... (flutter/flutter#173784)
2025-08-14 [email protected] [Range slider] Tap on active range,  the thumb closest to the mouse cursor should move to the cursor position. (flutter/flutter#173725)
2025-08-14 [email protected] Roll Packages from 6cb9113 to 09533b7 (4 revisions) (flutter/flutter#173789)
2025-08-14 [email protected] Implements the Android native stretch effect as a fragment shader (Impeller-only). (flutter/flutter#169293)
2025-08-14 [email protected] Sync `CHANGELOG.md` (3.35 -> `master`) (flutter/flutter#173790)
2025-08-14 [email protected] [VPAT][A11y] Announce Autocomplete search results status (flutter/flutter#173480)
2025-08-14 [email protected] Fix InputDecorator label padding (flutter/flutter#173344)
2025-08-14 [email protected] Fix default minimumSize in dropdownMenu when maximumSize is null (flutter/flutter#169438)
2025-08-14 [email protected] Thread sub-builders for every engine-uploading builder (flutter/flutter#173742)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC [email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
SydneyBao pushed a commit to SydneyBao/flutter that referenced this pull request Aug 22, 2025
This PR turns on predictive back route transitions by default on
supported Android devices.

With flutter#154718, the default
(PredictiveBackPageTransitionsBuilder) is the [shared element
transition](https://developer.android.com/design/ui/mobile/guides/patterns/predictive-back#shared-element-transition).
The [full screen
transition](https://developer.android.com/design/ui/mobile/guides/patterns/predictive-back#full-screen-surfaces)
is also available by using
PredictiveBackFullScreenPageTransitionsBuilder.

Original PR: flutter#146788

Depends on: flutter#154718

When this lands in stable, the docs should be updated:
https://docs.flutter.dev/platform-integration/android/predictive-back
SydneyBao pushed a commit to SydneyBao/flutter that referenced this pull request Aug 22, 2025
…" (flutter#173809)

<!-- start_original_pr_link -->
Reverts: flutter#165832
<!-- end_original_pr_link -->
<!-- start_initiating_author -->
Initiated by: matanlurey
<!-- end_initiating_author -->
<!-- start_revert_reason -->
Reason for reverting: Breaks `Linux_pixel_7pro
embedded_android_views_integration_test`:

-
https://ci.chromium.org/ui/p/flutter/builders/prod/Linux_pixel_7pro%20embedded_android_views_integration_test/8918/overview
-
https://ci.chromium.org/ui/p/flutter/builders/prod/Linux_pixel_7pro%20embedded_android_views_integration_test/8917/overview

```txt
[2025-08-14 16:01:17.600761] [STDOUT] stdout: [   +1 ms]   Expecte
<!-- end_revert_reason -->
<!-- start_original_pr_author -->
Original PR Author: justinmc
<!-- end_original_pr_author -->

<!-- start_reviewers -->
Reviewed By: {QuncCccccc}
<!-- end_reviewers -->

<!-- start_revert_body -->
This change reverts the following previous change:
This PR turns on predictive back route transitions by default on supported Android devices.

With flutter#154718, the default (PredictiveBackPageTransitionsBuilder) is the [shared element transition](https://developer.android.com/design/ui/mobile/guides/patterns/predictive-back#shared-element-transition). The [full screen transition](https://developer.android.com/design/ui/mobile/guides/patterns/predictive-back#full-screen-surfaces) is also available by using PredictiveBackFullScreenPageTransitionsBuilder.

Original PR: flutter#146788

Depends on: flutter#154718

When this lands in stable, the docs should be updated: https://docs.flutter.dev/platform-integration/android/predictive-back
<!-- end_revert_body -->

Co-authored-by: auto-submit[bot] <[email protected]>
SydneyBao pushed a commit to SydneyBao/flutter that referenced this pull request Aug 22, 2025
SydneyBao pushed a commit to SydneyBao/flutter that referenced this pull request Aug 22, 2025
This PR turns on predictive back route transitions by default on
supported Android devices.

With flutter#154718, the default
(PredictiveBackPageTransitionsBuilder) is the [shared element
transition](https://developer.android.com/design/ui/mobile/guides/patterns/predictive-back#shared-element-transition).
The [full screen
transition](https://developer.android.com/design/ui/mobile/guides/patterns/predictive-back#full-screen-surfaces)
is also available by using
PredictiveBackFullScreenPageTransitionsBuilder.

Original PR: flutter#146788

Depends on: flutter#154718

When this lands in stable, the docs should be updated:
https://docs.flutter.dev/platform-integration/android/predictive-back
SydneyBao pushed a commit to SydneyBao/flutter that referenced this pull request Aug 22, 2025
…" (flutter#173809)

<!-- start_original_pr_link -->
Reverts: flutter#165832
<!-- end_original_pr_link -->
<!-- start_initiating_author -->
Initiated by: matanlurey
<!-- end_initiating_author -->
<!-- start_revert_reason -->
Reason for reverting: Breaks `Linux_pixel_7pro
embedded_android_views_integration_test`:

-
https://ci.chromium.org/ui/p/flutter/builders/prod/Linux_pixel_7pro%20embedded_android_views_integration_test/8918/overview
-
https://ci.chromium.org/ui/p/flutter/builders/prod/Linux_pixel_7pro%20embedded_android_views_integration_test/8917/overview

```txt
[2025-08-14 16:01:17.600761] [STDOUT] stdout: [   +1 ms]   Expecte
<!-- end_revert_reason -->
<!-- start_original_pr_author -->
Original PR Author: justinmc
<!-- end_original_pr_author -->

<!-- start_reviewers -->
Reviewed By: {QuncCccccc}
<!-- end_reviewers -->

<!-- start_revert_body -->
This change reverts the following previous change:
This PR turns on predictive back route transitions by default on supported Android devices.

With flutter#154718, the default (PredictiveBackPageTransitionsBuilder) is the [shared element transition](https://developer.android.com/design/ui/mobile/guides/patterns/predictive-back#shared-element-transition). The [full screen transition](https://developer.android.com/design/ui/mobile/guides/patterns/predictive-back#full-screen-surfaces) is also available by using PredictiveBackFullScreenPageTransitionsBuilder.

Original PR: flutter#146788

Depends on: flutter#154718

When this lands in stable, the docs should be updated: https://docs.flutter.dev/platform-integration/android/predictive-back
<!-- end_revert_body -->

Co-authored-by: auto-submit[bot] <[email protected]>
SydneyBao pushed a commit to SydneyBao/flutter that referenced this pull request Aug 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: text input Entering text in a text field or keyboard related problems d: api docs Issues with https://api.flutter.dev/ d: examples Sample code and demos f: material design flutter/packages/flutter/material repository. f: routes Navigator, Router, and related APIs. f: scrolling Viewports, list views, slivers, etc. framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.