Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Normalize PageTransitionsTheme #170129

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
Loading
from

Conversation

huycozy
Copy link
Member

@huycozy huycozy commented Jun 6, 2025

This PR is to make PageTransitionsTheme conform to Flutter Material's conventions for component themes:

  • Added a PageTransitionsThemeData class which defines overrides for the configuration for PageTransitionsTheme.
  • Added PageTransitionsTheme constructor parameters: PageTransitionsThemeData? data and Widget? child. This is now the preferred way to configure a PageTransitionsTheme:
 theme: ThemeData(
    pageTransitionsTheme: const PageTransitionsThemeData(
      builders: <TargetPlatform, PageTransitionsBuilder>{
        TargetPlatform.android: xxx,
      },
    ),
  ),

These two properties are made nullable to not break existing apps which has customized ThemeData.pageTransitionsTheme.

  • Update PageTransitionsTheme to be an InheritedWidget subclass.
  • Add new tests for PageTransitionsTheme and PageTransitionsThemeData, and update the existing PageTransitionsTheme tests.
  • This also temporarily changes PageTransitionsThemeData to Object? in ThemeData class, to bypass g3 tests.
  • Addresses the "theme normalization" sub-project within ☂️ Material Theme System Updates #91772.

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

huycozy added 2 commits June 6, 2025 18:21
Signed-off-by: huycozy <huy@nevercode.io>
Signed-off-by: huycozy <huy@nevercode.io>
@huycozy huycozy self-assigned this Jun 6, 2025
@github-actions github-actions bot added framework flutter/packages/flutter repository. See also f: labels. f: material design flutter/packages/flutter/material repository. d: api docs Issues with https://api.flutter.dev/ d: examples Sample code and demos f: routes Navigator, Router, and related APIs. labels Jun 6, 2025
Signed-off-by: huycozy <huy@nevercode.io>
@huycozy huycozy force-pushed the page-transitions-theme-normalization branch from 1501c3b to 9cdd3f6 Compare June 6, 2025 12:05
@huycozy huycozy marked this pull request as ready for review June 7, 2025 04:29
@huycozy huycozy requested a review from QuncCccccc June 9, 2025 04:32
Copy link
Contributor

@QuncCccccc QuncCccccc left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution! I think I have removed the subtask for pageTranstiionsTheme from the "Component Theme Normalization" several weeks ago because it's not a theme for a specific widget. I think after InputDecorationTheme and AppBarTheme normalization, we can call the normalization section a "done"!😉 WDYT?

@huycozy
Copy link
Member Author

huycozy commented Jun 11, 2025

Thanks for your contribution! I think I have removed the subtask for pageTranstiionsTheme from the "Component Theme Normalization" several weeks ago because it's not a theme for a specific widget. I think after InputDecorationTheme and AppBarTheme normalization, we can call the normalization section a "done"!😉 WDYT?

@QuncCccccc I see. Should I close this PR then?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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. framework flutter/packages/flutter repository. See also f: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.