Repository navigation
Description
What package does this bug report belong to?
cupertino_ui
What target platforms are you seeing this bug on?
iOS
Have you already upgraded your packages?
Yes
Dependency versions
pubspec.lock
cupertino_ui:
dependency: "direct main"
description:
name: cupertino_ui
sha256: "369e39a1c5c030a6212589c3da1809920b1c2cfade7b02aade7695bfa4b88c3a"
url: "https://pub.dev"
source: hosted
version: "1.1.6"
Steps to reproduce
- Run the code sample beside a UIKit
UIButton.Configuration.tinted()atbuttonSize = .medium. - Compare them.
Expected results
CupertinoButtonSize.medium matches the UIKit tiers.
Actual results
5.7 taller, and a capsule where UIKit draws a 6pt rounded rect. iPhone 16 Pro, iOS 18.5, label "Save". Same numbers on 26.2.
| tier | cupertino_ui | UIKit | radius, cupertino_ui | radius, UIKit |
|---|---|---|---|---|
| small | 56.7 x 30.0 | 53.3 x 28.0 | 15.0 | 14.0 |
| medium | 66.7 x 40.0 | 61.0 x 34.3 | 20.0 | 6.00 |
| large | 76.7 x 52.0 | 77.0 x 50.3 | 12.0 | 8.67 |
kCupertinoButtonPadding's medium is vertical: 10, horizontal: 15 versus UIKit's insets of 7 and 12. kCupertinoButtonSizeBorderRadius's medium is 40, which clamps to half the height, against UIKit's drawn 6.
Small and large are close. Medium is the one that misses, and it is the tier UIKit and SwiftUI pick by default.
Context, not the bug
CupertinoButton defaults to CupertinoButtonSize.large, which the enum's doc calls "(classic)".
All three constant maps cite the iOS 17 HIG buttons page. Its only ladder today, 28/32/44/52/64, is the visionOS section, and kCupertinoButtonMinSize's 28/32/44 matches its first three tiers.
Code sample
Code sample
import 'package:cupertino_ui/cupertino_ui.dart';
void main() => runApp(
CupertinoApp(
home: ColoredBox(
color: CupertinoColors.white,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
spacing: 40,
children: <Widget>[
for (final sizeStyle in CupertinoButtonSize.values)
CupertinoButton.tinted(sizeStyle: sizeStyle, onPressed: () {}, child: const Text('Save')),
],
),
),
),
);Screenshots or Videos
Small, medium and large, top to bottom.
cupertino_ui![]() |
UIKit![]() |
Logs
UIKit, iOS 18.5. Frame after sizeToFit, radius off the laid-out layer tree.
small frame=53.3x28.0 insets=t5 l10 b5 radius=14.00
medium frame=61.0x34.3 insets=t7 l12 b7 radius=6.00
large frame=77.0x50.3 insets=t15 l20 b15 radius=8.67Flutter Doctor output
Doctor output
[✓] Flutter (Channel stable, 3.47.9, on macOS 15.7.9 24G830 darwin-arm64, locale en-US)
• Framework revision c197ca5199 (13 days ago), 2026-10-29 10:10:20 -0400

Activity