Repository navigation
Commit ca28abf
authored
Add
~This can only land **after**
flutter/packages#13263
This PR updates the [Material 3 Expressive component migration
checklist](https://github.com/flutter/flutter/blob/master/docs/ecosystem/material_ui/Material-3-Expressive-component-migration-checklist.md)
so that component migrations resolve the style variant with
`<Component>Theme.variantOf`.
With `variantOf`, a nested component theme that doesn't set `variant`
inherits it from its ancestors instead of resetting its subtree to
Material 3. The reference implementation is `IconButtonTheme.variantOf`
in flutter/packages#13263.
* Section 4: adds `variantOf`, its resolution order, and the reference
implementation.
* Section 5: uses `<Component>Theme.variantOf(context)` instead of
`<Component>Theme.of(context).variant`.
* Section 8: adds tests for variant inheritance.
* Section 13: lists `variantOf` in the PR description.
The [Material 3 Expressive migration
skill](https://github.com/flutter/packages/blob/main/.agents/skills/material-3-expressive-migration/SKILL.md)
reads this checklist, so agents pick up the change without a skill
update.
Related to flutter#194414 and
https://github.com/orgs/flutter/projects/250
Related to flutter#194414.
## Pre-launch Checklist
- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [AI contribution guidelines] and understand my
responsibilities, or I am not using AI tools.
- [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 in-code documentation (doc comments with
`///`).
- [x] If this PR introduces a new feature or capability, I created and
linked a website documentation issue or PR in [flutter/website] (or
verified none is needed).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.variantOf to the M3E migration checklist (flutter#195099)1 parent 6699e56 commit ca28abf
1 file changed
Lines changed: 45 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
132 | | - | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
133 | 173 | | |
134 | 174 | | |
135 | 175 | | |
| |||
148 | 188 | | |
149 | 189 | | |
150 | 190 | | |
151 | | - | |
152 | | - | |
| 191 | + | |
153 | 192 | | |
154 | 193 | | |
155 | 194 | | |
| |||
159 | 198 | | |
160 | 199 | | |
161 | 200 | | |
162 | | - | |
| 201 | + | |
163 | 202 | | |
164 | 203 | | |
165 | 204 | | |
| |||
200 | 239 | | |
201 | 240 | | |
202 | 241 | | |
| 242 | + | |
203 | 243 | | |
204 | 244 | | |
205 | 245 | | |
| |||
334 | 374 | | |
335 | 375 | | |
336 | 376 | | |
337 | | - | |
| 377 | + | |
338 | 378 | | |
339 | 379 | | |
340 | 380 | | |
| |||
0 commit comments