diff --git a/.github/labeler.yml b/.github/labeler.yml index ecd5359bbc91..d5698cc29c6f 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -18,6 +18,11 @@ - any-glob-to-any-file: - third_party/packages/cupertino_icons/**/* +'p: cupertino_ui' + - changed-files: + - any-glob-to-any-file: + - third_party/packages/cupertino_ui/**/* + 'p: espresso': - changed-files: - any-glob-to-any-file: @@ -266,6 +271,7 @@ - changed-files: - any-glob-to-any-file: - packages/animations/**/* + - packages/cupertino_ui/**/* - packages/flutter_lints/**/* - packages/go_router/**/* - packages/go_router_builder/**/* diff --git a/CODEOWNERS b/CODEOWNERS index c3c019649b1d..d8cf53f120b2 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -7,6 +7,7 @@ packages/animations/** @hannah-hyj packages/camera/** @bparrishMines packages/cross_file/** @stuartmorgan-g +packages/cupertino_ui/** @dkwingsmt packages/extension_google_sign_in_as_googleapis_auth/** @stuartmorgan-g packages/file_selector/** @stuartmorgan-g packages/flutter_lints/** @chunhtai diff --git a/README.md b/README.md index 412f66ad3d88..bc75bf7f9c59 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,7 @@ These are the packages hosted in this repository: | [camera](./packages/camera/) | [![pub package](https://img.shields.io/pub/v/camera.svg)](https://pub.dev/packages/camera) | [![pub points](https://img.shields.io/pub/points/camera)](https://pub.dev/packages/camera/score) | [![downloads](https://img.shields.io/pub/dm/camera)](https://pub.dev/packages/camera/score) | [![GitHub issues by-label](https://img.shields.io/github/issues/flutter/flutter/p%3A%20camera?label=)](https://github.com/flutter/flutter/labels/p%3A%20camera) | [![GitHub pull requests by-label](https://img.shields.io/github/issues-pr/flutter/packages/p%3A%20camera?label=)](https://github.com/flutter/packages/labels/p%3A%20camera) | | [cross\_file](./packages/cross_file/) | [![pub package](https://img.shields.io/pub/v/cross_file.svg)](https://pub.dev/packages/cross_file) | [![pub points](https://img.shields.io/pub/points/cross_file)](https://pub.dev/packages/cross_file/score) | [![downloads](https://img.shields.io/pub/dm/cross_file)](https://pub.dev/packages/cross_file/score) | [![GitHub issues by-label](https://img.shields.io/github/issues/flutter/flutter/p%3A%20cross_file?label=)](https://github.com/flutter/flutter/labels/p%3A%20cross_file) | [![GitHub pull requests by-label](https://img.shields.io/github/issues-pr/flutter/packages/p%3A%20cross_file?label=)](https://github.com/flutter/packages/labels/p%3A%20cross_file) | | [cupertino\_icons](./third_party/packages/cupertino_icons/) | [![pub package](https://img.shields.io/pub/v/cupertino_icons.svg)](https://pub.dev/packages/cupertino_icons) | [![pub points](https://img.shields.io/pub/points/cupertino_icons)](https://pub.dev/packages/cupertino_icons/score) | [![downloads](https://img.shields.io/pub/dm/cupertino_icons)](https://pub.dev/packages/cupertino_icons/score) | [![GitHub issues by-label](https://img.shields.io/github/issues/flutter/flutter/p%3A%20cupertino_icons?label=)](https://github.com/flutter/flutter/labels/p%3A%20cupertino_icons) | [![GitHub pull requests by-label](https://img.shields.io/github/issues-pr/flutter/packages/p%3A%20cupertino_icons?label=)](https://github.com/flutter/packages/labels/p%3A%20cupertino_icons) | +| [cupertino\_ui](./packages/cupertino_ui/) | [![pub package](https://img.shields.io/pub/v/cupertino_ui.svg)](https://pub.dev/packages/cupertino_ui) | [![pub points](https://img.shields.io/pub/points/cupertino_ui)](https://pub.dev/packages/cupertino_ui/score) | [![downloads](https://img.shields.io/pub/dm/cupertino_ui)](https://pub.dev/packages/cupertino_ui/score) | [![GitHub issues by-label](https://img.shields.io/github/issues/flutter/flutter/p%3A%20cupertino_ui?label=)](https://github.com/flutter/flutter/labels/p%3A%20cupertino_ui) | [![GitHub pull requests by-label](https://img.shields.io/github/issues-pr/flutter/packages/p%3A%20cupertino_ui?label=)](https://github.com/flutter/packages/labels/p%3A%20cupertino_ui) | | [espresso](./packages/espresso/) | [![pub package](https://img.shields.io/pub/v/espresso.svg)](https://pub.dev/packages/espresso) | [![pub points](https://img.shields.io/pub/points/espresso)](https://pub.dev/packages/espresso/score) | [![downloads](https://img.shields.io/pub/dm/espresso)](https://pub.dev/packages/espresso/score) | [![GitHub issues by-label](https://img.shields.io/github/issues/flutter/flutter/p%3A%20espresso?label=)](https://github.com/flutter/flutter/labels/p%3A%20espresso) | [![GitHub pull requests by-label](https://img.shields.io/github/issues-pr/flutter/packages/p%3A%20espresso?label=)](https://github.com/flutter/packages/labels/p%3A%20espresso) | | [extension\_google\_sign\_in\_as\_googleapis\_auth](./packages/extension_google_sign_in_as_googleapis_auth/) | [![pub package](https://img.shields.io/pub/v/extension_google_sign_in_as_googleapis_auth.svg)](https://pub.dev/packages/extension_google_sign_in_as_googleapis_auth) | [![pub points](https://img.shields.io/pub/points/extension_google_sign_in_as_googleapis_auth)](https://pub.dev/packages/extension_google_sign_in_as_googleapis_auth/score) | [![downloads](https://img.shields.io/pub/dm/extension_google_sign_in_as_googleapis_auth)](https://pub.dev/packages/extension_google_sign_in_as_googleapis_auth/score) | [![GitHub issues by-label](https://img.shields.io/github/issues/flutter/flutter/p%3A%20extension_google_sign_in_as_googleapis_auth?label=)](https://github.com/flutter/flutter/labels/p%3A%20extension_google_sign_in_as_googleapis_auth) | [![GitHub pull requests by-label](https://img.shields.io/github/issues-pr/flutter/packages/p%3A%20extension_google_sign_in_as_googleapis_auth?label=)](https://github.com/flutter/packages/labels/p%3A%20extension_google_sign_in_as_googleapis_auth) | | [file\_selector](./packages/file_selector/) | [![pub package](https://img.shields.io/pub/v/file_selector.svg)](https://pub.dev/packages/file_selector) | [![pub points](https://img.shields.io/pub/points/file_selector)](https://pub.dev/packages/file_selector/score) | [![downloads](https://img.shields.io/pub/dm/file_selector)](https://pub.dev/packages/file_selector/score) | [![GitHub issues by-label](https://img.shields.io/github/issues/flutter/flutter/p%3A%20file_selector?label=)](https://github.com/flutter/flutter/labels/p%3A%20file_selector) | [![GitHub pull requests by-label](https://img.shields.io/github/issues-pr/flutter/packages/p%3A%20file_selector?label=)](https://github.com/flutter/packages/labels/p%3A%20file_selector) | diff --git a/packages/cupertino_ui/.gitignore b/packages/cupertino_ui/.gitignore new file mode 100644 index 000000000000..dd5eb98951f2 --- /dev/null +++ b/packages/cupertino_ui/.gitignore @@ -0,0 +1,31 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. +/pubspec.lock +**/doc/api/ +.dart_tool/ +.flutter-plugins-dependencies +/build/ +/coverage/ diff --git a/packages/cupertino_ui/.metadata b/packages/cupertino_ui/.metadata new file mode 100644 index 000000000000..e44d1b1ea178 --- /dev/null +++ b/packages/cupertino_ui/.metadata @@ -0,0 +1,10 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: "4d0d113b75746f1ec1d93a976f0f02f6bb61dc2d" + channel: "[user-branch]" + +project_type: package diff --git a/packages/cupertino_ui/AUTHORS b/packages/cupertino_ui/AUTHORS new file mode 100644 index 000000000000..557dff97933b --- /dev/null +++ b/packages/cupertino_ui/AUTHORS @@ -0,0 +1,6 @@ +# Below is a list of people and organizations that have contributed +# to the Flutter project. Names should be added to the list like so: +# +# Name/Organization + +Google Inc. diff --git a/packages/cupertino_ui/CHANGELOG.md b/packages/cupertino_ui/CHANGELOG.md new file mode 100644 index 000000000000..de9bfc1600b8 --- /dev/null +++ b/packages/cupertino_ui/CHANGELOG.md @@ -0,0 +1,3 @@ +## 0.0.1 + +* Initial setup of the `cupertino_ui` package, preparing for decoupling Cupertino widgets from the Flutter framework. diff --git a/packages/cupertino_ui/LICENSE b/packages/cupertino_ui/LICENSE new file mode 100644 index 000000000000..29b709dac6c7 --- /dev/null +++ b/packages/cupertino_ui/LICENSE @@ -0,0 +1,25 @@ +Copyright 2013 The Flutter Authors + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google Inc. nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/packages/cupertino_ui/README.md b/packages/cupertino_ui/README.md new file mode 100644 index 000000000000..b9b17ea7e56b --- /dev/null +++ b/packages/cupertino_ui/README.md @@ -0,0 +1,24 @@ +# cupertino\_ui + +**Coming soon \- the official Cupertino widget library for Flutter as its own standalone package\!** + +`cupertino_ui` will contain the standard collection of high-fidelity visual components that implement the latest iOS design language (buttons, navigation bars, pickers, etc.). + +**Note:** This package will contain the cupertino library previously part of the Flutter framework itself (`package:flutter/cupertino.dart`). It is being decoupled to allow for faster iteration and a more modular ecosystem. + +## What's (going to be) Inside? + +This package will provide the Cupertino widgets you know and love, including but not limited to: + +* **Structure:** `CupertinoPageScaffold`, `CupertinoNavigationBar` +* **Inputs:** `CupertinoButton`, `CupertinoTextField`, `CupertinoSwitch` +* **Dialogs:** `CupertinoAlertDialog`, `CupertinoActionSheet` + +Once landed and published, look forward to updates from [iOS26](https://github.com/flutter/flutter/issues/170310)\! 🚀 + +## Feedback & Roadmap + +We are currently migrating the Cupertino library out of the core framework. + +* **Follow the progress:** [Decoupling Github Project](https://github.com/orgs/flutter/projects/220) +* **Report bugs:** [Cupertino issues in Flutter](https://github.com/flutter/flutter/issues?q=is%3Aopen%20is%3Aissue%20label%3A%22f%3A%20cupertino%22) diff --git a/packages/cupertino_ui/lib/cupertino_ui.dart b/packages/cupertino_ui/lib/cupertino_ui.dart new file mode 100644 index 000000000000..44384ed9496e --- /dev/null +++ b/packages/cupertino_ui/lib/cupertino_ui.dart @@ -0,0 +1,10 @@ +// Copyright 2013 The Flutter Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +/// The Flutter Cupertino Design library. +/// +/// To use, import `package:cupertino_ui/cupertino_ui.dart`. +library cupertino_ui; + +export 'package:flutter/cupertino.dart'; diff --git a/packages/cupertino_ui/pubspec.yaml b/packages/cupertino_ui/pubspec.yaml new file mode 100644 index 000000000000..df913bbfc049 --- /dev/null +++ b/packages/cupertino_ui/pubspec.yaml @@ -0,0 +1,23 @@ +name: cupertino_ui +description: The official Flutter Cupertino Design Library, implementing the iOS design system. +version: 0.0.1 +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%22 + +environment: + sdk: ^3.9.0 + flutter: ">=3.35.0" + +dependencies: + flutter: + sdk: flutter + +dev_dependencies: + flutter_test: + sdk: flutter + +topics: + - ui + - widgets + - cupertino + - ios diff --git a/packages/cupertino_ui/test/cupertino_ui_test.dart b/packages/cupertino_ui/test/cupertino_ui_test.dart new file mode 100644 index 000000000000..88e2c4b6754f --- /dev/null +++ b/packages/cupertino_ui/test/cupertino_ui_test.dart @@ -0,0 +1,12 @@ +// Copyright 2013 The Flutter Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'package:cupertino_ui/cupertino_ui.dart'; +import 'package:flutter_test/flutter_test.dart'; + +void main() { + testWidgets('Cupertino library is exported', (WidgetTester tester) async { + await tester.pumpWidget(const CupertinoApp(home: SizedBox.shrink())); + }); +}