Skip to content

CupertinoNavigationBar.large doesn't consider large title in preferred size #173721

@romaingyh

Description

@romaingyh

Steps to reproduce

  1. Run the code sample

Expected results

All numbers should be visibles like on this image :

Image

Actual results

First numbers are hidden behind the CupertinoNavigationBar. It's because the rendered size is different from the preferred size which doesn't include the large title height.

Image

Code sample

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

void main() {
  runApp(const MainApp());
}

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

  @override
  Widget build(BuildContext context) {
    return CupertinoApp(
      theme: CupertinoThemeData(brightness: Brightness.dark),
      home: CupertinoPageScaffold(
        navigationBar: CupertinoNavigationBar.large(
          largeTitle: Text("Title"),
          backgroundColor: CupertinoColors.black,
        ),
        child: Center(
          child: Column(children: [for (var i = 0; i < 10; i++) Text('$i')]),
        ),
      ),
    );
  }
}

Screenshots or Video

No response

Logs

No response

Flutter Doctor output

Doctor output
[✓] Flutter (Channel stable, 3.32.8, on macOS 15.6 24G84 darwin-arm64, locale fr-FR) [373ms]
    • Flutter version 3.32.8 on channel stable at
      /Users/romanojw10/Documents/developpement/flutter_arm
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision edada7c56e (3 weeks ago), 2025-07-25 14:08:03 +0000
    • Engine revision ef0cd00091
    • Dart version 3.8.1
    • DevTools version 2.45.1

[!] Android toolchain - develop for Android devices (Android SDK version 35.0.0) [1 198ms]
    • Android SDK at /Users/romanojw10/Library/Android/sdk
    • Platform android-36, build-tools 35.0.0
    • ANDROID_HOME = /Users/romanojw10/Library/Android/sdk
    • Java binary at: /Users/romanojw10/Applications/Android
      Studio.app/Contents/jbr/Contents/Home/bin/java
      This is the JDK bundled with the latest Android Studio installation on this machine.
      To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`.
    • Java version OpenJDK Runtime Environment (build 21.0.5+-13047016-b750.29)
    ! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses

[✓] Xcode - develop for iOS and macOS (Xcode 16.4) [671ms]
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 16F6
    • CocoaPods version 1.16.2

[✗] Chrome - develop for the web (Cannot find Chrome executable at /Applications/Google
    Chrome.app/Contents/MacOS/Google Chrome) [35ms]
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.

[✓] Android Studio (version 2024.3) [34ms]
    • Android Studio at /Users/romanojw10/Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 21.0.5+-13047016-b750.29)

[✓] IntelliJ IDEA Ultimate Edition (version 2024.3.5) [32ms]
    • IntelliJ at /Users/romanojw10/Applications/IntelliJ IDEA Ultimate.app
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart

[✓] VS Code (version 1.101.2) [14ms]
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.114.0

[✓] Connected device (2 available) [5,9s]
    • iPhone 16 Pro (mobile)                     • E425CEE5-C0CE-4D48-B1D8-7CE37C00A125 • ios
      • com.apple.CoreSimulator.SimRuntime.iOS-18-5 (simulator)
    • macOS (desktop)                            • macos                                •
      darwin-arm64 • macOS 15.6 24G84 darwin-arm64

[✓] Network resources [275ms]
    • All expected network resources are available.

! Doctor found issues in 2 categories.

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work listf: cupertinoflutter/packages/flutter/cupertino repositoryfound in release: 3.32Found to occur in 3.32found in release: 3.33Found to occur in 3.33frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onr: 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