Qun Cheng
e5217b670b
Update tokens to 4.0.0 ( #148789 )
...
This PR is to
* Update the Material Design tokens to 4.0.0
Since the last token update(#145356 ), only `Slider` tokens have been updated. The M3 `Slider` has significant visual changes, compared to the original M3 Slider, so a separate PR would be needed. I commented out `SliderTemplate` and added a TODO when we are ready to add new widgets again.
2024-05-22 15:08:25 +00:00
Nate
c53a18f4e4
Implementing null-aware operators throughout the repository ( #143804 )
...
This pull request fixes #143803 by taking advantage of Dart's null-aware operators.
And unlike `switch` expressions ([9 PRs](https://github.com/flutter/flutter/pull/143634 ) and counting), the Flutter codebase is already fantastic when it comes to null-aware coding. After refactoring the entire repo, all the changes involving `?.` and `??` can fit into a single pull request.
2024-02-23 19:02:22 +00:00
Qun Cheng
4a0f261b4e
Add Card.filled
and Card.outlined
factory methods ( #136229 )
...
Fixes #119401
This PR is to:
* add `Card.filled` and `Card.outlined` factory methods so that we can use tokens for these two types of cards to generate default theme instead of providing hard-corded values in example.
* update card.2.dart example.
* add test file for card.2.dart example.
* fix some mismatch caused by editing the auto-generated defaults by hand in navigation_bar.dart and navigation_drawer.dart.
2023-11-01 23:29:49 +00:00
Pierre-Louis
0830a362d5
Add support for M3 motion ( #129942 )
...
## Description
This adds support for M3 easing and duration tokens.
This PR includes these changes:
* Generation of duration and easing constants, in `Durations` and
`Easing`, respectively (`Curves` is already taken in the `animation`
library)
* Add 3 Dart fixes
Once this is merged, I'll migrate packages/plugins/customers and then
uncomment the deprecation notices for the 3 M2 curves, all of which have
1:1 replacements.
## Related Issues
- Fixes https://github.com/flutter/flutter/issues/116525
## Tests
- Added Dart fix tests
## Pre-launch Checklist
- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] All existing and new tests are passing.
If you need help, consider asking for advice on the #hackers-new channel
on [Discord].
<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[test-exempt]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/wiki/Chat
2023-07-19 22:07:59 +02:00
Pierre-Louis
66cda5917d
Improve defaults generation with logging, stats, and token validation ( #128244 )
...
## Description
This improves defaults generation with logging, stats, and token validation.
This PR includes these changes:
* introduce `TokenLogger`, with a verbose mode
* prints versions and tokens usage to the console
* outputs `generated/used_tokens.csv`, a list of all used tokens, for use by Google
* find token files in `data` automatically
* hide tokens `Map`
* tokens can be obtained using existing resolvers (e.g. `color`, `shape`), or directly through `getToken`.
* tokens can be checked for existence with `tokenAvailable`
* remove version from template, since the tokens are aggregated and multiple versions are possible (as is the case currently), it does not make sense to attribute a single version
* improve documentation
## Related Issues
- Fixes https://github.com/flutter/flutter/issues/122602
## Tests
- Added tests for `TokenLogger`
- Regenerated tokens, no-op except version removal
## Future work
A future PR should replace or remove the following invalid tokens usages
<img width="578" alt="image" src="https://github.com/flutter/flutter/assets/6655696/b6f9e5a7-523f-4f72-94f9-1b0bf4cc9f00 ">
2023-06-09 11:28:18 +00:00
Taha Tesser
513ff44bce
Add FilterChip.elevated
, ChoiceChip.elevated
, & ActionChip.elevated
variants ( #128049 )
2023-06-01 16:29:28 -07:00
Qun Cheng
0300cfa603
Create SearchAnchor
and SearchViewTheme
Widget ( #123256 )
2023-03-27 23:31:11 -07:00
Qun Cheng
5180e45080
Create SearchBar
and SearchBarTheme
( #122309 )
2023-03-16 15:04:19 -07:00
Pierre-Louis
598ebfbd66
Update Material tokens to 0.162 ( #122388 )
...
Update Material tokens to 0.162
2023-03-13 16:16:07 +00:00
Qun Cheng
b114654947
Add IconButton.filled
, IconButton.filledTonal
, IconButton.outlined
( #121884 )
2023-03-03 19:59:39 -08:00
Taha Tesser
219ff64574
Reland "Update ExpansionTile to support Material 3 & add an example" ( #121212 )
2023-02-24 06:30:33 -08:00
Hans Muller
212bac80d1
Revert "Update ExpansionTile
to support Material 3 & add an example ( #119712 )" ( #120300 )
...
This reverts commit e8eac0d047
.
2023-02-08 10:53:55 -08:00
Taha Tesser
e8eac0d047
Update ExpansionTile
to support Material 3 & add an example ( #119712 )
2023-02-07 08:21:18 -08:00
Eilidh Southren
7a6f1d81d6
M3 segmented buttons token fixes ( #120095 )
...
* add icon button property override
* Revert "add icon button property override"
This reverts commit 6c7f4d3067
.
* segmented button updates
* button changes
* fix
* put that thing back where it came from
* template updates
* analyzer fixes
* rename parameter
* analyzer fixes
* string interpolation fix
* template updates
* test updates
2023-02-07 10:53:36 +00:00
Hans Muller
198a51ace9
Migrate the Material Date pickers to M3 Reprise ( #119033 )
2023-01-31 15:31:06 -08:00
Taha Tesser
fa1a4eebf3
Update ListTile
to support Material 3 ( #117965 )
...
* Update `ListTile` to support Material 3
* Update `Default ListTile debugFillProperties`
* Add #99933 HTML workaround.
2023-01-09 21:01:07 +00:00
Xilai Zhang
c089c19f16
Revert "[reland] Add Material 3 support for ListTile
- Part 1 ( #116963 )" ( #117756 )
...
This reverts commit 57fb36ee0a
.
2022-12-29 05:36:21 +00:00
Taha Tesser
57fb36ee0a
[reland] Add Material 3 support for ListTile
- Part 1 ( #116963 )
...
* [reland] Add Material 3 support for `ListTile` - Part 1
* Update doc
2022-12-14 21:13:59 +00:00
Greg Spencer
fae458b925
Convert TimePicker to Material 3 ( #116396 )
...
* Make some minor changes in preparation for updating the Time Picker to M3
* Revert OutlineInputBorder.borderRadius type change
* Revert more OutlineInputBorder.borderRadius changes.
* Convert TimePicker to Material 3
* Add example test
* Revert OutlineInputBorder.borderRadius type change
* Fix test
* Review Changes
* Merge changes
* Some sizing and elevation fixes
* Fix localization tests
2022-12-14 00:09:52 +00:00
Hans Muller
882e105a4c
Revert "Add Material 3 support for ListTile
- Part 1 ( #116194 )" ( #116908 )
...
This reverts commit e57b7f4ea8
.
2022-12-12 20:06:21 +00:00
Taha Tesser
e57b7f4ea8
Add Material 3 support for ListTile
- Part 1 ( #116194 )
...
* Add Material 3 support for `ListTile` - Part 1
* minor refactor
* Add `useMaterial3: false` to M2 tests
2022-12-09 20:05:12 +00:00
Eilidh Southren
29422d25fe
M3 snackbar [re-land] ( #116218 )
...
* Add M2 defaults and template skeleton
* add MaterialStateColor functionality to ActionTextColor (issue #110402 )
* Add M2 defaults and template skeleton
* updated material 3 tokens
* Updated snackbar demo
* add theme tests
* add gen defaults
* formatting
* more whitespace fixes
* add widget type
* update docs
* code review changes
* Add line overflow functionality
* whitespace fixes
* update M3 animation
* whitespace fixes
* add insetPadding param
* Modifed icon parameter to showCloseIcon
* white space fixes
* test fixes
* rename iconColor to closeIconColor
* debug test fix
* de-britishification
* g3fix
* g3fix
* debug test fix
2022-11-30 19:13:00 +00:00
Taha Tesser
a52293843c
[Reland] Add Material 3 support for TabBar
( #116283 )
...
* Add Material 3 support for `TabBar`
* M3 `TabBar` revert fix and tests
2022-11-30 17:58:07 +00:00
Pierre-Louis
b2672fe835
Revert "Add Material 3 support for TabBar
( #116110 )" ( #116273 )
...
This reverts commit 900b395451
.
2022-11-30 13:20:19 +00:00
Taha Tesser
900b395451
Add Material 3 support for TabBar
( #116110 )
2022-11-29 22:36:37 +00:00
Kate Lovett
8b32ac7a51
Revert "Update SnackBar to support Material 3" ( #116199 )
...
* Revert "Update SnackBar to support Material 3 (#115750 )"
This reverts commit d58855c499
.
* Kick ci.yaml
Co-authored-by: Jenn Magder <magder@google.com>
2022-11-29 19:11:43 +00:00
Eilidh Southren
d58855c499
Update SnackBar to support Material 3 ( #115750 )
...
* Add M2 defaults and template skeleton
* add MaterialStateColor functionality to ActionTextColor (issue #110402 )
* Add M2 defaults and template skeleton
* updated material 3 tokens
* Updated snackbar demo
* add theme tests
* add gen defaults
* formatting
* more whitespace fixes
* add widget type
* update docs
* code review changes
* Add line overflow functionality
* whitespace fixes
* update M3 animation
* whitespace fixes
* add insetPadding param
* Modifed icon parameter to showCloseIcon
* white space fixes
* test fixes
* rename iconColor to closeIconColor
* debug test fix
* de-britishification
2022-11-29 18:02:34 +00:00
hangyu
0e57147db1
nav drawer ( #115668 )
2022-11-18 15:10:05 -08:00
Darren Austin
6ec2bd0a80
M3 Segmented Button widget ( #113723 )
2022-11-11 22:13:57 -08:00
Hans Muller
5a600456b0
Reland: Adds support for the Material Badge widget, BadgeTheme, BadgeThemeData ( #114560 ) ( #115002 )
...
Requires G3Fix cl/486997831
2022-11-10 11:05:50 -08:00
Hans Muller
d6a8e92cd6
Revert "Adds support for the Material Badge widget, BadgeTheme, BadgeThemeData ( #114560 )" ( #114819 )
...
This reverts commit a6da1042a8
.
2022-11-07 08:50:56 -08:00
Hans Muller
a6da1042a8
Adds support for the Material Badge widget, BadgeTheme, BadgeThemeData ( #114560 )
2022-11-06 17:21:08 -08:00
Darren Austin
89418ef85f
Added tokens for Snackbar widget. ( #114466 )
2022-11-02 12:02:46 -07:00
Darren Austin
6a66aa282f
Add Material 3 support for BottomAppBar (reland #106525 ) ( #114439 )
...
* Revert "Revert "Add Material 3 support for BottomAppBar" (#114421 )"
This reverts commit 210a2aa371
.
* Regenerated the defaults from tokens and fixed tests.
* Fixed the tests.
* Updated the shape token template to optimize the a common case.
2022-11-02 10:54:19 +00:00
Taha Tesser
97d0247d59
Add Material 3 support for Slider
- Part 1 ( #114079 )
2022-11-01 19:31:00 -07:00
Zachary Anderson
210a2aa371
Revert "Add Material 3 support for BottomAppBar" ( #114421 )
2022-11-01 15:12:09 +00:00
Talat El Beick
0e98194681
Add Material 3 support for BottomAppBar ( #106525 )
2022-11-01 00:42:33 -07:00
Qun Cheng
cc435d673e
Fix Color Scheme Defaults in Material 3 ( #112666 )
2022-10-28 10:30:59 -07:00
Qun Cheng
3ce88d3813
Replace menu defaults with tokens ( #113963 )
2022-10-25 14:46:34 -07:00
Taha Tesser
b4058b95f5
Update Popup Menu to support Material 3 ( #103606 )
2022-10-24 12:15:18 -07:00
hangyu
4fed6aaeff
Support Material 3 in bottom sheet ( #112466 )
2022-10-11 09:55:26 +00:00
Darren Austin
2bf83dd860
Add support for Material 3 Divider and VerticalDivider ( #112655 )
2022-09-29 11:30:53 -07:00
Taha Tesser
fd6997f07a
Add Dialog.fullscreen
and example ( #112261 )
2022-09-29 09:12:05 -07:00
Casey Hillers
bd5c347193
Revert "Add support for Material 3 Divider
and VerticalDivider
" ( #112471 )
2022-09-27 15:15:59 +00:00
Taha Tesser
1d5f455c4c
Add support for Material 3 Divider
and VerticalDivider
( #112378 )
2022-09-26 20:36:09 +00:00
Qun Cheng
e167162830
Updated ProgressIndicator
to M3 ( #112139 )
2022-09-23 11:13:40 -07:00
Qun Cheng
06b87fba64
Update Radio button to material 3 ( #111774 )
2022-09-20 14:09:20 -07:00
Darren Austin
df110ef020
Provide Material 3 defaults for vanilla Chip
widget. ( #111597 )
2022-09-19 19:23:55 +00:00
Viren Khatri
e2ab3e581e
fixed inconsistent file names for *_chip.dart files and added a test ( #111364 )
2022-09-17 03:17:06 +00:00
Taha Tesser
e8e979772a
Reland "Update MaterialBanner
to support Material 3" ( #111299 )
2022-09-16 17:24:07 +00:00