mirror of
https://github.com/flutter/packages.git
synced 2026-03-13 10:40:37 +08:00
[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:
6
.github/labeler.yml
vendored
6
.github/labeler.yml
vendored
@@ -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/**/*
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -59,6 +59,7 @@ These are the packages hosted in this repository:
|
||||
| [interactive\_media\_ads](./packages/interactive_media_ads/) | [](https://pub.dev/packages/interactive_media_ads) | [](https://pub.dev/packages/interactive_media_ads/score) | [](https://pub.dev/packages/interactive_media_ads/score) | [](https://github.com/flutter/flutter/labels/p%3A%20interactive_media_ads) | [](https://github.com/flutter/packages/labels/p%3A%20interactive_media_ads) |
|
||||
| [in\_app\_purchase](./packages/in_app_purchase/) | [](https://pub.dev/packages/in_app_purchase) | [](https://pub.dev/packages/in_app_purchase/score) | [](https://pub.dev/packages/in_app_purchase/score) | [](https://github.com/flutter/flutter/labels/p%3A%20in_app_purchase) | [](https://github.com/flutter/packages/labels/p%3A%20in_app_purchase) |
|
||||
| [local\_auth](./packages/local_auth/) | [](https://pub.dev/packages/local_auth) | [](https://pub.dev/packages/local_auth/score) | [](https://pub.dev/packages/local_auth/score) | [](https://github.com/flutter/flutter/labels/p%3A%20local_auth) | [](https://github.com/flutter/packages/labels/p%3A%20local_auth) |
|
||||
| [material\_ui](./packages/material_ui/) | [](https://pub.dev/packages/material_ui) | [](https://pub.dev/packages/material_ui/score) | [](https://pub.dev/packages/material_ui/score) | [](https://github.com/flutter/flutter/labels/p%3A%20material_ui) | [](https://github.com/flutter/packages/labels/p%3A%20material_ui) |
|
||||
| [metrics\_center](./packages/metrics_center/) | [](https://pub.dev/packages/metrics_center) | [](https://pub.dev/packages/metrics_center/score) | [](https://pub.dev/packages/metrics_center/score) | [](https://github.com/flutter/flutter/labels/p%3A%20metrics_center) | [](https://github.com/flutter/packages/labels/p%3A%20metrics_center) |
|
||||
| [multicast\_dns](./packages/multicast_dns/) | [](https://pub.dev/packages/multicast_dns) | [](https://pub.dev/packages/multicast_dns/score) | [](https://pub.dev/packages/multicast_dns/score) | [](https://github.com/flutter/flutter/labels/p%3A%20multicast_dns) | [](https://github.com/flutter/packages/labels/p%3A%20multicast_dns) |
|
||||
| [path\_parsing](./third_party/packages/path_parsing/) | [](https://pub.dev/packages/path_parsing) | [](https://pub.dev/packages/path_parsing/score) | [](https://pub.dev/packages/path_parsing/score) | [](https://github.com/flutter/flutter/labels/p%3A%20path_parsing) | [](https://github.com/flutter/packages/labels/p%3A%20path_parsing) |
|
||||
|
||||
31
packages/material_ui/.gitignore
vendored
Normal file
31
packages/material_ui/.gitignore
vendored
Normal 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/
|
||||
10
packages/material_ui/.metadata
Normal file
10
packages/material_ui/.metadata
Normal 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
|
||||
6
packages/material_ui/AUTHORS
Normal file
6
packages/material_ui/AUTHORS
Normal 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.
|
||||
3
packages/material_ui/CHANGELOG.md
Normal file
3
packages/material_ui/CHANGELOG.md
Normal file
@@ -0,0 +1,3 @@
|
||||
## 0.0.1
|
||||
|
||||
* Initial setup of the `material_ui` package, preparing for decoupling Material widgets from the Flutter framework.
|
||||
25
packages/material_ui/LICENSE
Normal file
25
packages/material_ui/LICENSE
Normal 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.
|
||||
25
packages/material_ui/README.md
Normal file
25
packages/material_ui/README.md
Normal 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)
|
||||
10
packages/material_ui/lib/material_ui.dart
Normal file
10
packages/material_ui/lib/material_ui.dart
Normal 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';
|
||||
22
packages/material_ui/pubspec.yaml
Normal file
22
packages/material_ui/pubspec.yaml
Normal 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
|
||||
13
packages/material_ui/test/material_ui_test.dart
Normal file
13
packages/material_ui/test/material_ui_test.dart
Normal 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()));
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user