Repository navigation
CupertinoNavigationBar leading is too high #18536
Copy link
Copy link
Closed
Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projecta: fidelityMatching the OEM platforms betterMatching the OEM platforms betterfound in release: 3.16Found to occur in 3.16Found to occur in 3.16found in release: 3.19Found to occur in 3.19Found to occur in 3.19frameworkflutter/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 onp: cupertino_uicupertino_ui package in flutter/packagescupertino_ui package in flutter/packagesteam-designOwned by Design Languages teamOwned by Design Languages teamtriaged-designTriaged by Design Languages teamTriaged by Design Languages teamworkaround availableThere is a workaround available to overcome the issueThere is a workaround available to overcome the issue
Description
For some reason the leading in CupertinoNavigationBar is too high. Any ideas?
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return new MaterialApp(
title: 'Flutter Demo',
theme: new ThemeData(
primarySwatch: Colors.blueGrey,
),
home: CupertinoPageScaffold(
navigationBar: new CupertinoNavigationBar(
leading: Text("lead"),
middle: Text("Title"),
trailing: Text("Trailing")
),
child: Center(child: Text("Test!")),
)
);
}
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projecta: fidelityMatching the OEM platforms betterMatching the OEM platforms betterfound in release: 3.16Found to occur in 3.16Found to occur in 3.16found in release: 3.19Found to occur in 3.19Found to occur in 3.19frameworkflutter/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 onp: cupertino_uicupertino_ui package in flutter/packagescupertino_ui package in flutter/packagesteam-designOwned by Design Languages teamOwned by Design Languages teamtriaged-designTriaged by Design Languages teamTriaged by Design Languages teamworkaround availableThere is a workaround available to overcome the issueThere is a workaround available to overcome the issue
Type
Projects
- StatusShow more project fieldsDone

Activity
jonahwilliams commentedon Jun 17, 2018
(cc @xster)
While it looks okay with the iOS style back button it is a little weird that with text it aligns so strangely. Comparison:
lukepighetti commentedon Jun 18, 2018
Yes I can confirm that with the back arrow it looks fine, but with text it is too high.
Somewhat unrelated, where can I find tools that show information on widgets such as bounding boxes, hitbox, etc. I did find profiler for framerate which is really nice.
xster commentedon Jul 7, 2018
This seems consistent with the Material AppBar API as well where the leading widget is forced to take the full height of the leading position slot.
The easiest workaround is to wrap your leading widget with
I'll see if we can make it more convenient
lukepighetti commentedon Jul 7, 2018
THIS. IS.
SPARTA.Cupertino!zoechi commentedon Jan 28, 2019
lukepighetti commentedon Jan 28, 2019
zoechi commentedon Jan 28, 2019
The easiest workaround is to wrap your leading widget with ...
AlignI interpreted it as working as intended.
Ok, I missed that. I'll reopen.
27 remaining items
Piinks commentedon Aug 14, 2024
What is interesting to me here is that trailing does not have the same behavior as leading. Looking at leading and trailing together definitely looks like a bug. AppBar does not have trailing to compare to (like leading discussed above), but maybe we should check AppBar.actions, which is sort of the same as CupertinoNavigationBar.trailing?
victorsanni commentedon Aug 14, 2024
AppBar.actionsbehaves likeCupertinoNavigationBar.trailing, only that it allows for multipletrailings.victorsanni commentedon May 15, 2025
Part of #91715
victorsanni commentedon Jun 5, 2025
flutter/packages/flutter/lib/src/widgets/navigation_toolbar.dart
Line 107 in 1af0c06
Align persistent nav bar leading widget (#170095)
Squashed commit of the following:
github-actions commentedon Jun 20, 2025
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 -vand a minimal reproduction of the issue.