Skip to content

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
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
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.

1 participant
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy