Skip to content

CupertinoSliverNavigationBar Regression of previousPageTitle hero transition after upgrading from Flutter 3.29.3 to 3.32.0+ #170525

Open
@fntyk

Description

@fntyk

Steps to reproduce

  1. Run the provided code sample.
  2. Tap “Go to Next Page”.
  3. Observe the hero transition.
Expected results Actual results
Transition like before 3.32.0 (Please look at video demonstration) Please look at video demonstration
Image Image

Code sample

Code sample
import 'package:flutter/cupertino.dart';

void main() => runApp(const SliverNavBarApp());

class SliverNavBarApp extends StatelessWidget {
  const SliverNavBarApp({super.key});

  @override
  Widget build(BuildContext context) {
    return const CupertinoApp(home: SliverNavBarExample());
  }
}

class SliverNavBarExample extends StatelessWidget {
  const SliverNavBarExample({super.key});

  @override
  Widget build(BuildContext context) {
    return CupertinoPageScaffold(
      child: CustomScrollView(
        slivers: [
          CupertinoSliverNavigationBar(largeTitle: Text('Favorites')),
          SliverFillRemaining(
            child: Center(
              child: CupertinoButton.filled(
                onPressed: () => Navigator.push(context, CupertinoPageRoute(builder: (BuildContext context) => NextPage())),
                child: Text('Go to Next Page'),
              ),
            ),
          ),
        ],
      ),
    );
  }
}

class NextPage extends StatelessWidget {
  const NextPage({super.key});

  @override
  Widget build(BuildContext context) {
    return CupertinoPageScaffold(
      child: CustomScrollView(
        slivers: [
          CupertinoSliverNavigationBar(largeTitle: Text('Page'), previousPageTitle: 'Favorites'),
          SliverFillRemaining(child: Center(child: Text('Page'))),
        ],
      ),
    );
  }
}

Screenshots or Video

Screenshots / Video demonstration
3.32.3.mp4
3.29.3.mp4

Logs

No response

Flutter Doctor output

Doctor output
[✓] Flutter (Channel stable, 3.32.3, on macOS 15.5 24F74 darwin-arm64, locale en-US) [252ms]
    • Flutter version 3.32.3 on channel stable at /Users/fntyk/Development/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 5c1433509f (18 hours ago), 2025-06-11 13:12:24 -0700
    • Engine revision 31c4875c7a
    • Dart version 3.8.1
    • DevTools version 2.45.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    a: fidelityMatching the OEM platforms betterc: proposalA detailed proposal for a change to Flutterf: cupertinoflutter/packages/flutter/cupertino repositoryteam-designOwned by Design Languages team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions