-
Notifications
You must be signed in to change notification settings - Fork 29.2k
Closed
Closed
Copy link
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listf: cupertinoflutter/packages/flutter/cupertino repositoryflutter/packages/flutter/cupertino repositoryf: routesNavigator, Router, and related APIs.Navigator, Router, and related APIs.found in release: 3.22Found to occur in 3.22Found to occur in 3.22found in release: 3.23Found to occur in 3.23Found to occur in 3.23frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-designOwned by Design Languages teamOwned by Design Languages teamtriaged-designTriaged by Design Languages teamTriaged by Design Languages team
Description
Also related to #90589
Steps to reproduce
You can see it clearly if you run this code on dartpad:
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return const CupertinoApp(
home: MyHomePage(title: "Home", backButtonText: ""));
}
}
class MyHomePage extends StatefulWidget {
const MyHomePage(
{super.key, required this.title, required this.backButtonText});
final String title;
final String backButtonText;
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
return CupertinoPageScaffold(
navigationBar: CupertinoNavigationBar(
previousPageTitle: widget.backButtonText,
// automaticallyImplyLeading: true,
middle: Text(widget.title),
trailing: const Row(
mainAxisSize: MainAxisSize.min,
children: [],
),
),
child: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
ElevatedButton(
child: const Text("Go"),
onPressed: () {
Navigator.of(context).push(CupertinoPageRoute(
builder: (c) => MyHomePage(
title: "Oh dear",
backButtonText: "${widget.backButtonText}Back",
)));
},
),
],
),
), // This trailing comma makes auto-formatting nicer for build methods.
);
}
}
Expected results
I don't expect it to flicker
Actual results
Screen.Recording.2024-06-07.at.16.58.50.mov
Code sample
Code sample
[Paste your code here]
Screenshots or Video
Screenshots / Video demonstration
Screen.Recording.2024-06-07.at.16.58.50.mov
Logs
Logs
[Paste your logs here]
Flutter Doctor output
Doctor output
[✓] Flutter (Channel stable, 3.22.2, on macOS 14.5 23F79 darwin-arm64, locale en-GB)
• Flutter version 3.22.2 on channel stable at /Users/foobar/dev/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 761747bfc5 (2 days ago), 2024-06-05 22:15:13 +0200
• Engine revision edd8546116
• Dart version 3.4.3
• DevTools version 2.34.3
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listf: cupertinoflutter/packages/flutter/cupertino repositoryflutter/packages/flutter/cupertino repositoryf: routesNavigator, Router, and related APIs.Navigator, Router, and related APIs.found in release: 3.22Found to occur in 3.22Found to occur in 3.22found in release: 3.23Found to occur in 3.23Found to occur in 3.23frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-designOwned by Design Languages teamOwned by Design Languages teamtriaged-designTriaged by Design Languages teamTriaged by Design Languages team
Type
Projects
Status
Done