pub repository
mirror.p-hatan.comcupertino_ui
1.1.4The official Flutter Cupertino Design Library, implementing the iOS design system.
Readme
cupertino_ui
The official Flutter Cupertino library, implementing Apple's Human Interface Guidelines for Flutter applications.
cupertino_ui provides a complete, high-fidelity suite of visual components,
motion, typography, color system, and theming tools to build authentic
iOS- and macOS-style user interfaces on all screen sizes.
See also the
material_ui
package, which is Flutter's official Material Design library.
New to the package?
Install the package with the following command:
flutter add cupertino_ui
See Flutter's main getting started
guide for information about using Flutter
and cupertino_ui.
Migrating existing code to this package
The standalone cupertino_ui package was previously built directly into the
core Flutter framework as package:flutter/cupertino.dart. It has been
decoupled from the flutter/flutter
repository into its new home here in flutter/packages.
Follow the steps below to migrate:
Step 1: Migrate imports
We've included a data driven Dart fix to help users migrate. Simply run the following command:
dart fix --apply --code=migrate_design_widgets
This performs the equivalent of adding cupertino_ui to your project and
changing imports of package:flutter/cupertino.dart to
package:cupertino_ui/cupertino_ui.dart.
Step 2: Migrate localizations (if needed)
Don't use the GlobalMaterialLocalizations or GlobalCupertinoLocalizations
classes from flutter/flutter's flutter_localizations package. Instead, use the
new versions of these classes from material_ui and cupertino_ui,
respectively.
Step 3: Bridge legacy dependencies (if needed)
If your app uses third-party packages or subtrees that still import and rely on
package:flutter/cupertino.dart, use CupertinoUiCompatibilityBridge to bridge
CupertinoThemeData and CupertinoLocalizations so legacy widgets resolve
correctly within modern widget trees.
Wrap your app using CupertinoApp.builder:
import 'package:cupertino_ui/cupertino_ui.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return CupertinoApp(
builder: (BuildContext context, Widget? child) {
return CupertinoUiCompatibilityBridge(child: child!);
},
home: const HomeScreen(),
);
}
}
You can also wrap individual subtrees that contain legacy package widgets:
CupertinoPageScaffold(
navigationBar: const CupertinoNavigationBar(
middle: Text('Modern Screen'),
),
child: CupertinoUiCompatibilityBridge(
child: LegacyPackageWidget(),
),
)
Features
The cupertino_ui package contains everything you need to create a
fully-featured iOS app, such as:
- App Structure & Navigation:
CupertinoApp,CupertinoPageScaffold,CupertinoTabScaffold,CupertinoTabView,CupertinoNavigationBar,CupertinoSliverNavigationBar,CupertinoTabBar,CupertinoPageRoute - Buttons & Controls:
CupertinoButton,CupertinoSegmentedControl,CupertinoSlidingSegmentedControl,CupertinoContextMenu,CupertinoContextMenuAction,CupertinoScrollbar - Inputs & Selection:
CupertinoTextField,CupertinoTextFormFieldRow,CupertinoFormSection,CupertinoFormRow,CupertinoSwitch,CupertinoSlider,CupertinoCheckbox,CupertinoRadio,CupertinoSearchTextField - Pickers & Dialogs:
CupertinoPicker,CupertinoDatePicker,CupertinoTimerPicker,CupertinoAlertDialog,CupertinoActionSheet,CupertinoActionSheetAction,CupertinoPopupSurface - Display & Feedback:
CupertinoListSection,CupertinoListTile,CupertinoActivityIndicator,CupertinoIcons,CupertinoFocusHalo - Theming & Typography:
CupertinoTheme,CupertinoThemeData,CupertinoTextThemeData,CupertinoColors,CupertinoDynamicColor - Internationalization:
CupertinoLocalizationsandGlobalCupertinoLocalizationsfor multi-locale support
Changelog
See the Changelog for a list of new features and breaking changes.
Documentation & Resources
Changelog
1.1.4
- Fix CupertinoMagnifier focalPointOffset during in/out animation.
1.1.3
- Fixes
CupertinoPickerthrowing when it is disposed during the tap-to-select animation.
1.1.2
- Fixes
CupertinoMagnifierfocal point not being vertically centered when a customsizeis used. - Fixes unresolved doc comment references.
- Fixes
showCupertinoSheetignoringshowDragHandleby forwarding it toCupertinoSheetRoute.
1.1.1
- Updates minimum supported SDK version to Flutter 3.47/Dart 3.13.
1.1.0
- Add
hasPlatformViewsto Cupertino sheet transitions to keep platform views synchronized with the underlying route. - Allows
CupertinoTabBarto contain a single item. - Fixed some leaks of TextEditingControllers in the cupertino_ui magnifier examples.
- Fixed an issue where the
CupertinoIconsfont was not included in the cupertino_ui examples. - Adds an option for
CupertinoPageRouteandCupertinoPageto opt out of introducing a semantics route scope. - Fixes lower routes being revealed through the top gap when multiple
CupertinoSheetRoutes are stacked. - Adds awaitNotRequired annotation to showCupertinoModalPopup and showCupertinoDialog.
1.0.1
- Add missing Widget of the Week videos to widget API docs.
1.0.0
- README updated for the full release of cupertino_ui.
- Promotes the pre-release to 1.0.0.
- Added a main.dart example for the Pub "Example" tab that references a curated list of existing examples.
0.0.3+1
- Remove unresolvable doc import for flutter_test
0.0.3
- Fix API doc by clearing unsupported directives introduced by macros.
- Fix API doc references.
- Adds CupertinoUiCompatibilityBridge for legacy flutter/cupertino.dart compatibility.
- Refactors examples to not cross-import material_ui.
0.0.2
- Copies over all Cupertino code from flutter/flutter.
- Copies over Cupertino localizations from flutter/flutter's flutter_localizations package.
- Migrates API doc samples and formatting.
- Updates minimum supported SDK version to Flutter 3.44/Dart 3.12.
0.0.1
- Initial setup of the
cupertino_uipackage, preparing for decoupling Cupertino widgets from the Flutter framework.
Installing
export PUB_HOSTED_URL=https://pub.mirror.p-hatan.com
flutter pub add cupertino_uipubspec.yaml
name: cupertino_ui
description: The official Flutter Cupertino Design Library, implementing the iOS design system.
version: 1.1.4
repository: https://github.com/flutter/packages/tree/main/packages/cupertino_ui
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A%20cupertino_ui%22
environment:
sdk: ^3.13.0
flutter: ">=3.47.0"
dependencies:
collection: ^1.19.1
flutter:
sdk: flutter
flutter_localizations:
sdk: flutter
intl: ^0.20.2
dev_dependencies:
clock: ^1.1.2
flutter_goldens:
path: ../../script/flutter_goldens
flutter_test:
sdk: flutter
# To track memory leaks.
leak_tracker_flutter_testing: ^3.0.10
material_ui: ^1.0.0
path: ^1.9.1
topics:
- ui
- widgets
- cupertino
- ios
Version history
| Version | Published | Archive | SHA-256 |
|---|---|---|---|
| 0.0.1 | 2026-02-18T16:46:00.205480Z | Download | 1fa3c6bf0925e96c7235ab4f1a6c701cc07e3c7abe13aa4e3d1219e651586615 |
| 0.0.2 | 2026-07-21T20:57:56.635426Z | Download | 427360789a03b76eaf659c37131570d2fc98e381f80d55f252bd9e30f37e7126 |
| 0.0.3 | 2026-08-04T20:41:15.906777Z | Download | d2fdf425cdb4d003538223869b31ef6d25049e70e0259ffd742859177e9000b9 |
| 0.0.3+1 | 2026-08-10T21:29:13.261316Z | Download | 58191e8c198d274d299b4a92e5fa9bf1abf1d870067cf064b67f2217957aefe9 |
| 1.0.0 | 2026-08-12T19:04:21.957975Z | Download | 7ed8ce4159d342eec4c65f4ea6eec57adaf9365404378541f38efc1da20a5b3d |
| 1.0.1 | 2026-08-24T16:06:04.511585Z | Download | 2137c0d41f3b62cc4d3d2495e6c354bd6b6133cd21c6bb155736cc31dbd49a11 |
| 1.0.2 | 2026-09-02T16:21:48.930457Z | Download | e9dfe7fac704028f8928cbe4028a0be5e8a709498e8daf8247de99e99a32aef3 |
| 1.1.0 | 2026-09-15T16:44:49.900045Z | Download | c6747018d37d32feeeb858a1d7043831cb541460ebe1a890a995cdb8df8ea5a5 |
| 1.1.1 | 2026-09-21T23:50:30.044559Z | Download | c23816577a1280cff409e989541767887011f8f1d8c1863a794ed308af46f2a9 |
| 1.1.2 | 2026-10-06T21:37:24.237146Z | Download | ea0b8170b40a86262b2fc21ac0625303f52df209dbf6fccc2b98b27eff44f6ce |
| 1.1.3 | 2026-10-14T18:39:39.444384Z | Download | 8e14acc2817ff469b925b0e275ab85ecc6c769621360dd0af1331c47f916e247 |
| 1.1.4 | 2026-10-20T16:26:44.794805Z | Download | a47c4e7c66fd7444a063a602597fceb238f705c3f6b1322bc0053d0a2638ee6e |
Dependencies
collection "^1.19.1"
flutter {
"sdk": "flutter"
}
flutter_localizations {
"sdk": "flutter"
}
intl "^0.20.2"