Skip to content

refactor: migrate CupertinoPageTransitionsBuilder to cupertino folder#179776

Merged
auto-submit[bot] merged 5 commits intoflutter:masterfrom
rkishan516:page-transitions-builder
Feb 10, 2026
Merged

refactor: migrate CupertinoPageTransitionsBuilder to cupertino folder#179776
auto-submit[bot] merged 5 commits intoflutter:masterfrom
rkishan516:page-transitions-builder

Conversation

@rkishan516
Copy link
Contributor

@rkishan516 rkishan516 commented Dec 12, 2025

Changes:

  • Move CupertinoPageTransitionsBuilder from material/page_transitions_theme.dart to cupertino/route.dart

part of: #172929

Pre-launch Checklist

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • I read the [Tree Hygiene] wiki page, which explains my responsibilities.
  • I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement].
  • I signed the [CLA].
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is [test-exempt].
  • I followed the [breaking change policy] and added [Data Driven Fixes] where supported.
  • All existing and new tests are passing.

@github-actions github-actions bot added framework flutter/packages/flutter repository. See also f: labels. f: material design flutter/packages/flutter/material repository. f: cupertino flutter/packages/flutter/cupertino repository d: api docs Issues with https://api.flutter.dev/ d: examples Sample code and demos f: routes Navigator, Router, and related APIs. labels Dec 12, 2025
Copy link
Contributor

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

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 refactors the CupertinoPageTransitionsBuilder by moving it from the material library to the cupertino library. This is a logical change as the builder's implementation is based on Cupertino transition mixins. The author has correctly updated all usages within the repository, including examples and tests, by adding the necessary cupertino.dart import. The changes are clean, correct, and improve code organization. I have reviewed the code and found no issues.

Copy link
Contributor

@victorsanni victorsanni left a comment

Choose a reason for hiding this comment

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

Can we add a test here?

@rkishan516
Copy link
Contributor Author

Can we add a test here?

I have added few tests.

Comment on lines +1552 to +1553
/// Used by [PageTransitionsTheme] to define a horizontal [MaterialPageRoute]
/// page transition animation that matches native iOS page transitions.
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we have a more non-Material oriented + Cupertino/iOS heavy documentation here? Then add a See also section that mentions MaterialPageRoute and PageTransitionsTheme etc.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated.

@rkishan516 rkishan516 force-pushed the page-transitions-builder branch 3 times, most recently from 0e44a9f to 65c30e4 Compare December 19, 2025 02:52
@victorsanni victorsanni self-requested a review December 19, 2025 23:44
@rkishan516 rkishan516 force-pushed the page-transitions-builder branch from 65c30e4 to 27d80ce Compare December 23, 2025 08:30
@rkishan516 rkishan516 force-pushed the page-transitions-builder branch from 27d80ce to 4d6c439 Compare December 24, 2025 02:08
@victorsanni
Copy link
Contributor

Google tests are failing due to missing cupertino imports.

@rkishan516
Copy link
Contributor Author

Google tests are failing due to missing cupertino imports.

Will someone update those, or should we export these from material.dart(for now)?

@victorsanni
Copy link
Contributor

This file will need a cupertino import if this PR lands.

Can we add a one-line dart fix here @Piinks? Considering the design libraries might be decoupling anyways. I think this PR warrants a migration guide at least.

@Piinks
Copy link
Contributor

Piinks commented Jan 7, 2026

Can we add a one-line dart fix here

Hmm, I am not sure if dart fix can do this, but I've reached out to see if they can. Otherwise we should be able to add it manually.

I think a simple migration guide is a good idea. It can cover all the things we moved around wrt page transitions and explain why. :)

copybara-service bot pushed a commit to dart-lang/sdk that referenced this pull request Jan 8, 2026
Based on flutter/flutter#179776.

Change-Id: Ia80e1c4217959b8309694fa12973fdacf032fcf9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/471603
Reviewed-by: Brian Wilkerson <[email protected]>
Commit-Queue: Keerti Parthasarathy <[email protected]>
@rkishan516
Copy link
Contributor Author

Hmm, I am not sure if dart fix can do this, but I've reached out to see if they can. Otherwise we should be able to add it manually.
I think a simple migration guide is a good idea. It can cover all the things we moved around wrt page transitions and explain why. :)

I will create a simple migration guide for this.

@Piinks
Copy link
Contributor

Piinks commented Jan 12, 2026

I heard back from the Dart team, looks like dart fix can do this. Here is an example:

transforms:
  - title: 'Replaced by cupertino CupertinoPageTransitionsBuilder'
    date: 2023-11-09
    element:
      uris: ['material.dart']
      class: 'CupertinoPageTransitionsBuilder'
    changes:
    - kind: 'replacedBy'
      newElement:
        uris: ['cupertino.dart']
        class: 'CupertinoPageTransitionsBuilder'

@Piinks
Copy link
Contributor

Piinks commented Jan 12, 2026

Thanks for the migration guide as well!

sfshaza2 added a commit to flutter/website that referenced this pull request Jan 12, 2026
Add migration guide for page transition builders reorganisation 

_PRs or commits this PR depends on (if any):
flutter/flutter#179776

Changes
- Added
src/content/release/breaking-changes/decouple-page-transition-builders.md
with:
- Overview of all page transition builders and their libraries
- Background explaining why the reorganization was made
- Simple migration guide (add Cupertino import)
- Added entry to src/content/release/breaking-changes/index.md under
"Not yet released to stable"

## Presubmit checklist

- [x] If you are unwilling, or unable, to sign the CLA, even for a
_tiny_, one-word PR, please file an issue instead of a PR.
- [x] If this PR is not meant to land until a future stable release,
mark it as draft with an explanation.
- [x] This PR follows the [Google Developer Documentation Style
Guidelines](https://developers.google.com/style)—for example, it doesn't
use _i.e._ or _e.g._, and it avoids _I_ and _we_ (first-person
pronouns).
- [x] This PR uses [semantic line
breaks](https://github.com/dart-lang/site-shared/blob/main/doc/writing-for-dart-and-flutter-websites.md#semantic-line-breaks)
  of 80 characters or fewer.

---------

Co-authored-by: Shams Zakhour <[email protected]>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@rkishan516 rkishan516 force-pushed the page-transitions-builder branch from 4d6c439 to ecf684d Compare January 15, 2026 02:44
@github-actions github-actions bot added the c: tech-debt Technical debt, code quality, testing, etc. label Jan 15, 2026
@rkishan516
Copy link
Contributor Author

@Piinks Need your green flag for merging.

@victorsanni victorsanni self-requested a review January 28, 2026 18:44
@rkishan516 rkishan516 added the autosubmit Merge PR when tree becomes green via auto submit App label Jan 29, 2026
@victorsanni victorsanni removed the autosubmit Merge PR when tree becomes green via auto submit App label Feb 3, 2026
@victorsanni
Copy link
Contributor

Google testing is passing now, just need to resolve some internal hitches that are preventing it from being reflected on the Github UI.

@victorsanni victorsanni requested review from Piinks and removed request for MitchellGoodwin February 3, 2026 23:56
Copy link
Contributor

@Piinks Piinks left a comment

Choose a reason for hiding this comment

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

LGTM! This might need a rebase to land now?

@Piinks Piinks force-pushed the page-transitions-builder branch from 10780a7 to bbe101b Compare February 9, 2026 23:58
@Piinks
Copy link
Contributor

Piinks commented Feb 9, 2026

Rebased 👍 I will confirm with Victor that the Google testing failures are ok before popping on the autosubmit. :)

@victorsanni
Copy link
Contributor

Rebased 👍 I will confirm with Victor that the Google testing failures are ok before popping on the autosubmit. :)

Should be ok - I added the cupertino library import to relevant files (and a comment for the linter to ignore since it is currently unused).

@Piinks Piinks added the autosubmit Merge PR when tree becomes green via auto submit App label Feb 10, 2026
@auto-submit auto-submit bot added this pull request to the merge queue Feb 10, 2026
Merged via the queue into flutter:master with commit 7c5d804 Feb 10, 2026
73 checks passed
@flutter-dashboard flutter-dashboard bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Feb 10, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 10, 2026
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Feb 10, 2026
Roll Flutter from e8f9dc50356d to 9bda20a11f1e (34 revisions)

flutter/flutter@e8f9dc5...9bda20a

2026-02-10 [email protected] Remove Material import from focus_traversal_test.dart (flutter/flutter#180994)
2026-02-10 [email protected] Roll Skia from 6e217430c052 to cffb3bf918df (1 revision) (flutter/flutter#182131)
2026-02-10 [email protected] Encourage splitting large test files in testing documentation 2 (flutter/flutter#182051)
2026-02-10 [email protected] refactor: migrate CupertinoPageTransitionsBuilder to cupertino folder (flutter/flutter#179776)
2026-02-10 [email protected] Delete the last remaining skia only fragment shader tests (flutter/flutter#182127)
2026-02-10 [email protected] [a11y][android] Set new CheckState APIs for android API 36  (flutter/flutter#182113)
2026-02-10 [email protected] Add missing dependencies to framework_tests_misc_leak_tracking (flutter/flutter#181929)
2026-02-10 [email protected] Roll Dart SDK from eee0e2e11174 to 69eb951f8f7e (2 revisions) (flutter/flutter#182128)
2026-02-10 [email protected] Marks Linux_android_emu android_display_cutout to be flaky (flutter/flutter#181901)
2026-02-10 [email protected] Bump Dart to 3.10 (flutter/flutter#174066)
2026-02-10 [email protected] Roll Skia from d4b7e24a209b to 6e217430c052 (6 revisions) (flutter/flutter#182126)
2026-02-09 [email protected] Intercept UIScene device log and print a guided warning (flutter/flutter#181515)
2026-02-09 [email protected] Introduce ScrollCacheExtent and also fixes unbound shrinkwrap cache ex… (flutter/flutter#181092)
2026-02-09 [email protected] [Android] Add mechanism for setting Android engine flags via Android manifest (take 2) (flutter/flutter#181632)
2026-02-09 [email protected] Fix wrong comment about default impeller value (flutter/flutter#181831)
2026-02-09 [email protected] fix build fail for wayland only platform (flutter/flutter#182057)
2026-02-09 [email protected] [AGP 9] Added Warning Against Updating to AGP 9 (flutter/flutter#181977)
2026-02-09 [email protected] Updated Shaderc dep (flutter/flutter#180976)
2026-02-09 [email protected] Refactor accessibility guidelines out to widget layer (flutter/flutter#181672)
2026-02-09 [email protected] Roll Skia from 68dff53238e5 to d4b7e24a209b (2 revisions) (flutter/flutter#182087)
2026-02-09 [email protected] fix: OutlineInputBorder not respecting BorderSide stroke alignment (flutter/flutter#180487)
2026-02-09 [email protected] Adds opengles to engine dart tests (flutter/flutter#181933)
2026-02-09 [email protected] Add command to build a Swift Package for Add to App and generate FlutterPluginRegistrant (flutter/flutter#181224)
2026-02-09 [email protected] Remove unused constant in `bundle.dart` (flutter/flutter#182023)
2026-02-09 [email protected] Roll Fuchsia Linux SDK from iqtwdXlgKIyZkL5Li... to 7BGf7mPQvgLi7Axb6... (flutter/flutter#182082)
2026-02-09 [email protected] Remove unused getters in `user_messages.dart` (flutter/flutter#181867)
2026-02-09 [email protected] Roll Packages from 7805d3e to 3d5eaa5 (3 revisions) (flutter/flutter#182083)
2026-02-09 [email protected] Roll Skia from 5d891cd7fb7f to 68dff53238e5 (1 revision) (flutter/flutter#182080)
2026-02-09 [email protected] Update example description (flutter/flutter#182067)
2026-02-09 [email protected] Roll Dart SDK from 965b51c219d3 to eee0e2e11174 (1 revision) (flutter/flutter#182073)
2026-02-09 [email protected] Roll Skia from 9533d7533d59 to 5d891cd7fb7f (6 revisions) (flutter/flutter#182070)
2026-02-09 [email protected] Add a new flutter cli command, running-apps, using mDNS app discovery (flutter/flutter#180098)
2026-02-09 [email protected] Roll Skia from b7db9f35f0f2 to 9533d7533d59 (2 revisions) (flutter/flutter#182069)
2026-02-08 [email protected] Improve FlWindowMonitor API (flutter/flutter#181885)

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

...
rickhohler pushed a commit to rickhohler/flutter that referenced this pull request Feb 19, 2026
…flutter#179776)

Changes:

* Move CupertinoPageTransitionsBuilder from
material/page_transitions_theme.dart to cupertino/route.dart

part of: flutter#172929

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.
@rkishan516 rkishan516 deleted the page-transitions-builder branch February 20, 2026 03:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c: tech-debt Technical debt, code quality, testing, etc. d: api docs Issues with https://api.flutter.dev/ d: examples Sample code and demos f: cupertino flutter/packages/flutter/cupertino repository f: material design flutter/packages/flutter/material repository. f: routes Navigator, Router, and related APIs. framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants