[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.
This commit is contained in:
Kate Lovett
2026-02-18 10:15:00 -06:00
committed by GitHub
parent ff7dff5b41
commit 2684fe0e09
12 changed files with 153 additions and 0 deletions

6
.github/labeler.yml vendored
View File

@@ -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/**/*

View File

@@ -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

View File

@@ -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) |

31
packages/material_ui/.gitignore vendored Normal file
View File

@@ -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/

View File

@@ -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

View File

@@ -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 <email address>
Google Inc.

View File

@@ -0,0 +1,3 @@
## 0.0.1
* Initial setup of the `material_ui` package, preparing for decoupling Material widgets from the Flutter framework.

View File

@@ -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.

View File

@@ -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)

View File

@@ -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';

View File

@@ -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

View File

@@ -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()));
});
}