From 2684fe0e09f108133fb16faeee884c796f734b7a Mon Sep 17 00:00:00 2001 From: Kate Lovett Date: Wed, 18 Feb 2026 10:15:00 -0600 Subject: [PATCH] [material_ui] Add material_ui package (#11043) Creates the material_ui package in preparation for decoupling. Once published, this will be marked as `unlisted` (to be done in pub.dev dashboard) until the primary code move from the framework takes place. ## Pre-Review Checklist **Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the `gemini-code-assist` bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed. [^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. --- .github/labeler.yml | 6 ++++ CODEOWNERS | 1 + README.md | 1 + packages/material_ui/.gitignore | 31 +++++++++++++++++++ packages/material_ui/.metadata | 10 ++++++ packages/material_ui/AUTHORS | 6 ++++ packages/material_ui/CHANGELOG.md | 3 ++ packages/material_ui/LICENSE | 25 +++++++++++++++ packages/material_ui/README.md | 25 +++++++++++++++ packages/material_ui/lib/material_ui.dart | 10 ++++++ packages/material_ui/pubspec.yaml | 22 +++++++++++++ .../material_ui/test/material_ui_test.dart | 13 ++++++++ 12 files changed, 153 insertions(+) create mode 100644 packages/material_ui/.gitignore create mode 100644 packages/material_ui/.metadata create mode 100644 packages/material_ui/AUTHORS create mode 100644 packages/material_ui/CHANGELOG.md create mode 100644 packages/material_ui/LICENSE create mode 100644 packages/material_ui/README.md create mode 100644 packages/material_ui/lib/material_ui.dart create mode 100644 packages/material_ui/pubspec.yaml create mode 100644 packages/material_ui/test/material_ui_test.dart diff --git a/.github/labeler.yml b/.github/labeler.yml index d5698cc29c..3f8c43041a 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -114,6 +114,11 @@ - any-glob-to-any-file: - packages/local_auth/**/* +'p: material_ui': + - changed-files: + - any-glob-to-any-file: + - packages/material_ui/**/* + 'p: metrics_center': - changed-files: - any-glob-to-any-file: @@ -276,5 +281,6 @@ - packages/go_router/**/* - packages/go_router_builder/**/* - packages/google_fonts/**/* + - packages/material_ui/**/* - packages/two_dimensional_scrollables/**/* - third_party/packages/cupertino_icons/**/* diff --git a/CODEOWNERS b/CODEOWNERS index d8cf53f120..a49a588717 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -23,6 +23,7 @@ packages/image_picker/** @tarrinneal packages/interactive_media_ads/** @bparrishMines packages/in_app_purchase/** @bparrishMines packages/local_auth/** @stuartmorgan-g +packages/material_ui/** @qunccccccc packages/metrics_center/** @bkonyi packages/multicast_dns/** @vashworth packages/path_provider/** @stuartmorgan-g diff --git a/README.md b/README.md index bc75bf7f9c..b499d75433 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,7 @@ These are the packages hosted in this repository: | [interactive\_media\_ads](./packages/interactive_media_ads/) | [![pub package](https://img.shields.io/pub/v/interactive_media_ads.svg)](https://pub.dev/packages/interactive_media_ads) | [![pub points](https://img.shields.io/pub/points/interactive_media_ads)](https://pub.dev/packages/interactive_media_ads/score) | [![downloads](https://img.shields.io/pub/dm/interactive_media_ads)](https://pub.dev/packages/interactive_media_ads/score) | [![GitHub issues by-label](https://img.shields.io/github/issues/flutter/flutter/p%3A%20interactive_media_ads?label=)](https://github.com/flutter/flutter/labels/p%3A%20interactive_media_ads) | [![GitHub pull requests by-label](https://img.shields.io/github/issues-pr/flutter/packages/p%3A%20interactive_media_ads?label=)](https://github.com/flutter/packages/labels/p%3A%20interactive_media_ads) | | [in\_app\_purchase](./packages/in_app_purchase/) | [![pub package](https://img.shields.io/pub/v/in_app_purchase.svg)](https://pub.dev/packages/in_app_purchase) | [![pub points](https://img.shields.io/pub/points/in_app_purchase)](https://pub.dev/packages/in_app_purchase/score) | [![downloads](https://img.shields.io/pub/dm/in_app_purchase)](https://pub.dev/packages/in_app_purchase/score) | [![GitHub issues by-label](https://img.shields.io/github/issues/flutter/flutter/p%3A%20in_app_purchase?label=)](https://github.com/flutter/flutter/labels/p%3A%20in_app_purchase) | [![GitHub pull requests by-label](https://img.shields.io/github/issues-pr/flutter/packages/p%3A%20in_app_purchase?label=)](https://github.com/flutter/packages/labels/p%3A%20in_app_purchase) | | [local\_auth](./packages/local_auth/) | [![pub package](https://img.shields.io/pub/v/local_auth.svg)](https://pub.dev/packages/local_auth) | [![pub points](https://img.shields.io/pub/points/local_auth)](https://pub.dev/packages/local_auth/score) | [![downloads](https://img.shields.io/pub/dm/local_auth)](https://pub.dev/packages/local_auth/score) | [![GitHub issues by-label](https://img.shields.io/github/issues/flutter/flutter/p%3A%20local_auth?label=)](https://github.com/flutter/flutter/labels/p%3A%20local_auth) | [![GitHub pull requests by-label](https://img.shields.io/github/issues-pr/flutter/packages/p%3A%20local_auth?label=)](https://github.com/flutter/packages/labels/p%3A%20local_auth) | +| [material\_ui](./packages/material_ui/) | [![pub package](https://img.shields.io/pub/v/material_ui.svg)](https://pub.dev/packages/material_ui) | [![pub points](https://img.shields.io/pub/points/material_ui)](https://pub.dev/packages/material_ui/score) | [![downloads](https://img.shields.io/pub/dm/material_ui)](https://pub.dev/packages/material_ui/score) | [![GitHub issues by-label](https://img.shields.io/github/issues/flutter/flutter/p%3A%20material_ui?label=)](https://github.com/flutter/flutter/labels/p%3A%20material_ui) | [![GitHub pull requests by-label](https://img.shields.io/github/issues-pr/flutter/packages/p%3A%20material_ui?label=)](https://github.com/flutter/packages/labels/p%3A%20material_ui) | | [metrics\_center](./packages/metrics_center/) | [![pub package](https://img.shields.io/pub/v/metrics_center.svg)](https://pub.dev/packages/metrics_center) | [![pub points](https://img.shields.io/pub/points/metrics_center)](https://pub.dev/packages/metrics_center/score) | [![downloads](https://img.shields.io/pub/dm/metrics_center)](https://pub.dev/packages/metrics_center/score) | [![GitHub issues by-label](https://img.shields.io/github/issues/flutter/flutter/p%3A%20metrics_center?label=)](https://github.com/flutter/flutter/labels/p%3A%20metrics_center) | [![GitHub pull requests by-label](https://img.shields.io/github/issues-pr/flutter/packages/p%3A%20metrics_center?label=)](https://github.com/flutter/packages/labels/p%3A%20metrics_center) | | [multicast\_dns](./packages/multicast_dns/) | [![pub package](https://img.shields.io/pub/v/multicast_dns.svg)](https://pub.dev/packages/multicast_dns) | [![pub points](https://img.shields.io/pub/points/multicast_dns)](https://pub.dev/packages/multicast_dns/score) | [![downloads](https://img.shields.io/pub/dm/multicast_dns)](https://pub.dev/packages/multicast_dns/score) | [![GitHub issues by-label](https://img.shields.io/github/issues/flutter/flutter/p%3A%20multicast_dns?label=)](https://github.com/flutter/flutter/labels/p%3A%20multicast_dns) | [![GitHub pull requests by-label](https://img.shields.io/github/issues-pr/flutter/packages/p%3A%20multicast_dns?label=)](https://github.com/flutter/packages/labels/p%3A%20multicast_dns) | | [path\_parsing](./third_party/packages/path_parsing/) | [![pub package](https://img.shields.io/pub/v/path_parsing.svg)](https://pub.dev/packages/path_parsing) | [![pub points](https://img.shields.io/pub/points/path_parsing)](https://pub.dev/packages/path_parsing/score) | [![downloads](https://img.shields.io/pub/dm/path_parsing)](https://pub.dev/packages/path_parsing/score) | [![GitHub issues by-label](https://img.shields.io/github/issues/flutter/flutter/p%3A%20path_parsing?label=)](https://github.com/flutter/flutter/labels/p%3A%20path_parsing) | [![GitHub pull requests by-label](https://img.shields.io/github/issues-pr/flutter/packages/p%3A%20path_parsing?label=)](https://github.com/flutter/packages/labels/p%3A%20path_parsing) | diff --git a/packages/material_ui/.gitignore b/packages/material_ui/.gitignore new file mode 100644 index 0000000000..dd5eb98951 --- /dev/null +++ b/packages/material_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/material_ui/.metadata b/packages/material_ui/.metadata new file mode 100644 index 0000000000..e44d1b1ea1 --- /dev/null +++ b/packages/material_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/material_ui/AUTHORS b/packages/material_ui/AUTHORS new file mode 100644 index 0000000000..557dff9793 --- /dev/null +++ b/packages/material_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/material_ui/CHANGELOG.md b/packages/material_ui/CHANGELOG.md new file mode 100644 index 0000000000..2807f26fb5 --- /dev/null +++ b/packages/material_ui/CHANGELOG.md @@ -0,0 +1,3 @@ +## 0.0.1 + +* Initial setup of the `material_ui` package, preparing for decoupling Material widgets from the Flutter framework. diff --git a/packages/material_ui/LICENSE b/packages/material_ui/LICENSE new file mode 100644 index 0000000000..29b709dac6 --- /dev/null +++ b/packages/material_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/material_ui/README.md b/packages/material_ui/README.md new file mode 100644 index 0000000000..41885e8315 --- /dev/null +++ b/packages/material_ui/README.md @@ -0,0 +1,25 @@ +# material\_ui + +**Coming soon \- the official Material Design widget library for Flutter as its own standalone package\!** + +`material_ui` will contain the standard collection of visual components (Buttons, Cards, AppBars, etc.) that implement Google's latest Material Design specification. + +**Note:** This package will contain the material library previously part of the Flutter framework itself (`package:flutter/material.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 Material widgets you know and love, including but not limited to: + +* **Structure:** `Scaffold`, `AppBar`, `Drawer` +* **Inputs:** `FloatingActionButton`, `TextField`, `Slider` +* **Display:** `Card`, `Chip`, `ListTile` +* **Theming:** `ThemeData`, `ColorScheme` + +Once landed and published, look forward to updates from [Material 3 Expressive](https://github.com/flutter/flutter/issues/168813)\! 🚀 + +## Feedback & Roadmap + +We are currently migrating the Material library out of the core framework. + +* **Follow the progress:** [Decoupling Github Project](https://github.com/orgs/flutter/projects/220) +* **Report bugs:** [Material issues in Flutter](https://github.com/flutter/flutter/issues?q=is%3Aopen%20is%3Aissue%20label%3A%22f%3A%20material%20design%22) diff --git a/packages/material_ui/lib/material_ui.dart b/packages/material_ui/lib/material_ui.dart new file mode 100644 index 0000000000..1f2465f126 --- /dev/null +++ b/packages/material_ui/lib/material_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 Material Design library. +/// +/// To use, import `package:material_ui/material_ui.dart`. +library material_ui; + +export 'package:flutter/material.dart'; diff --git a/packages/material_ui/pubspec.yaml b/packages/material_ui/pubspec.yaml new file mode 100644 index 0000000000..1700a38784 --- /dev/null +++ b/packages/material_ui/pubspec.yaml @@ -0,0 +1,22 @@ +name: material_ui +description: The official Flutter Material UI Library, implementing Google's Material Design design system. +version: 0.0.1 +repository: https://github.com/flutter/packages/tree/main/packages/material_ui +issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A%20material%20design%22 + +environment: + sdk: ^3.9.0 + flutter: ">=3.35.0" + +dependencies: + flutter: + sdk: flutter + +dev_dependencies: + flutter_test: + sdk: flutter + +topics: + - ui + - widgets + - material diff --git a/packages/material_ui/test/material_ui_test.dart b/packages/material_ui/test/material_ui_test.dart new file mode 100644 index 0000000000..2056798581 --- /dev/null +++ b/packages/material_ui/test/material_ui_test.dart @@ -0,0 +1,13 @@ +// 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:flutter_test/flutter_test.dart'; + +import 'package:material_ui/material_ui.dart'; + +void main() { + testWidgets('Material library is exported', (WidgetTester tester) async { + await tester.pumpWidget(const MaterialApp(home: SizedBox.shrink())); + }); +}