Skip to content

PageTransitionsTheme needs to account for transition duration as well #29068

Closed

Description

@xster

Currently MaterialPageRoute is just hardcoded to have a transition duration of 300ms and CupertinoPageRoute, 400ms. A MaterialPageRoute using CupertinoPageTransitionsBuilder via PageTransitionsTheme uses the wrong time duration.

cc @HansMuller

Activity

  1. added
    c: regressionIt was better in the past than it is now
    frameworkflutter/packages/flutter repository. See also f: labels.
    p: material_uimaterial_ui package in flutter/packages
    p: cupertino_uicupertino_ui package in flutter/packages
    f: routesNavigator, Router, and related APIs.
    on Mar 8, 2019
  2. self-assigned this
    on May 29, 2019
  3. removed their assignment
    on Nov 1, 2019
  4. removed
    c: proposalA detailed proposal for a change to Flutter
    on Jun 9, 2020
  5. pedromassangocode commented on Jul 17, 2020

    @pedromassangocode

    On the current dev channel the PageTransitionsTheme doesn't account for the transition duration accordingly to his contructor:

    class PageTransitionsTheme with Diagnosticable {
    /// Construct a PageTransitionsTheme.
    ///
    /// By default the list of builders is: [FadeUpwardsPageTransitionsBuilder]
    /// for [TargetPlatform.android], and [CupertinoPageTransitionsBuilder] for
    /// [TargetPlatform.iOS] and [TargetPlatform.macOS].
    const PageTransitionsTheme({ Map<TargetPlatform, PageTransitionsBuilder> builders }) : _builders = builders;

    I was able to reproduce this in 1.21.0-1.0.pre.

    flutter doctor -v
    [✓] Flutter (Channel dev, 1.21.0-1.0.pre, on Mac OS X 10.15.5 19F101, locale en-AO)
        • Flutter version 1.21.0-1.0.pre at /Users/pedro/dev/SDKs/flutter_dev
        • Framework revision f25bd9c55c (2 days ago), 2020-07-14 20:26:01 -0400
        • Engine revision 99c2b3a245
        • Dart version 2.9.0 (build 2.9.0-21.0.dev 20bf2fcf56)
    
    [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.0)
        • Android SDK at /Users/pedro/Library/Android/sdk
        • Platform android-30, build-tools 30.0.0
        • Java binary at: /Users/pedro/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/193.6514223/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
        • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
        • All Android licenses accepted.
    
    [✓] Xcode - develop for iOS and macOS (Xcode 11.5)
        • Xcode at /Applications/Xcode.app/Contents/Developer
        • Xcode 11.5, Build version 11E608c
        • CocoaPods version 1.9.3
    
    [✓] Chrome - develop for the web
        • CHROME_EXECUTABLE = /Applications/Google Chrome.app/Contents/MacOS/google-chrome-unsafe
    
    [✓] Android Studio (version 4.0)
        • Android Studio at /Applications/Android Studio.app/Contents
        • Flutter plugin version 47.1.2
        • Dart plugin version 193.7361
        • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
    
    [✓] Android Studio (version 4.0)
        • Android Studio at /Users/pedro/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/193.6514223/Android Studio.app/Contents
        • Flutter plugin version 47.1.2
        • Dart plugin version 193.7361
        • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
    
    [✓] VS Code (version 1.47.0)
        • VS Code at /Applications/Visual Studio Code.app/Contents
        • Flutter extension version 3.12.1
    
    [✓] Connected device (4 available)
        • AOSP on IA Emulator (mobile) • emulator-5554 • android-x86    • Android 9 (API 28) (emulator)
        • macOS (desktop)              • macos         • darwin-x64     • Mac OS X 10.15.5 19F101
        • Web Server (web)             • web-server    • web-javascript • Flutter Tools
        • Chrome (web)                 • chrome        • web-javascript • Google Chrome 83.0.4103.116
    
    • No issues found!
    
  6. danagbemava-nc commented on Nov 1, 2022

    @danagbemava-nc
    Member

    The code hasn't changed since #29068 (comment)

    class PageTransitionsTheme with Diagnosticable {
    /// Construct a PageTransitionsTheme.
    ///
    /// By default the list of builders is: [FadeUpwardsPageTransitionsBuilder]
    /// for [TargetPlatform.android], and [CupertinoPageTransitionsBuilder] for
    /// [TargetPlatform.iOS] and [TargetPlatform.macOS].
    const PageTransitionsTheme({ Map<TargetPlatform, PageTransitionsBuilder> builders }) : _builders = builders;

  7. 2 remaining items

  8. added
    P2Important issues not at the top of the work list
    f: themingStyling widgets with a theme
    on Aug 22, 2024
  9. added a commit that references this issue on Jan 22, 2025
    c8e34e0
  10. added a commit that references this issue on Jan 24, 2025
    41e888c
  11. github-actions commented on Feb 6, 2025

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  12. locked as resolved and limited conversation to collaborators on Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listc: regressionIt was better in the past than it is nowf: routesNavigator, Router, and related APIs.f: themingStyling widgets with a themefound in release: 3.3Found to occur in 3.3found in release: 3.5Found to occur in 3.5frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onp: cupertino_uicupertino_ui package in flutter/packagesp: material_uimaterial_ui package in flutter/packagesr: fixedIssue is closed as already fixed in a newer versionteam-designOwned by Design Languages teamtriaged-designTriaged by Design Languages team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions