Skip to content

Decoupling Material's ProgressIndicator#11526

Closed
justinmc wants to merge 1077 commits intomainfrom
decoupling-progress-indicator
Closed

Decoupling Material's ProgressIndicator#11526
justinmc wants to merge 1077 commits intomainfrom
decoupling-progress-indicator

Conversation

@justinmc
Copy link
Copy Markdown
Contributor

@justinmc justinmc commented Apr 17, 2026

I'm attempting to move a minimal widget from Material to material_ui in order verify that everything is working. I've chosen ProgressIndicator because it makes only a few other imports from the Material library, but it still has examples/ that we can copy over as well.

Not viable without copying over nearly everything?

Wow there are a lot of transitive dependencies. Two big offenders:

I'm going to start with another PR copying just a leaf file (not a full widget).

TODO

  • Copy over referenced files.
  • Export from material_ui.dart.
  • Try installing and using the package locally.
  • Any other files needed for the examples or anything else you're forgetting?

goderbauer and others added 30 commits December 20, 2022 16:03
* Updated to tokens v0.150.

* Updated with a reverted list_tile.dart.
* Updated to tokens v0.150.

* Updated with a reverted list_tile.dart.
* Remove ThemeData.buttonColor references

* Fix test

* Remove more buttonColors

* Macro the definition of color scheme

* remove doc reference
* Remove ThemeData.buttonColor references

* Fix test

* Remove more buttonColors

* Macro the definition of color scheme

* remove doc reference
* Add Decoding Flutter videos to API docs

* Review comments

* Update widget of the week videos too
* Remove superfluous words from comments.

* Revert `win32_window.h`

Which seems to come from `gallery`
…9799)

* Add missing variants and *new* indicators to useMaterial3 docs

* add missing *new*
…(#119360)

Co-authored-by: Renzo Olivares <roliv@google.com>
* Update to v0.158 of the token database.

* Update checkbox template

* Fix DatePickerTheme test

---------

Co-authored-by: Qun Cheng <quncheng@google.com>
* Update to v0.158 of the token database.

* Update checkbox template

* Fix DatePickerTheme test

---------

Co-authored-by: Qun Cheng <quncheng@google.com>
* lerp documentation

* Remove Note, Note That from repo

* Improve BorderSide documentation.

* apply review comments
* lerp documentation

* Remove Note, Note That from repo

* Improve BorderSide documentation.

* apply review comments
Co-authored-by: Qun Cheng <quncheng@google.com>
* Add ActionButtonIconsData for overriding action icons

* Fix formatting issues

* Add missing exports in material library and add copyWith method in ActionButtonIconsData

* Move all action buttons, and icons to action_buttons.dart

* Rename actionButtonIcons to actionIconTheme

* Refactor buttons in action_buttons.dart to extend a private class for common implementation

* Refactor icons in action_buttons

* Fix docs in action_buttons_theme

* Fix #107646 always use 'Icons.arrow_back' as a back_button icon in web

* Update documentation for action buttons and add style parameter to every action button

* Fix analyzer warnings

* Add missing style argument in IconButton of _ActionButton

* Add tests for action buttons, action icon theme, drawer buttons, and back buttons

* Add example (+test) for action icon button's action icon theme in examples/api

* Fix analysis errors

* Add missing license header in action_icon_theme.0.dart

* Fix deprecation notice in theme_data.dart

* Update theme data tests for actionIconTheme

* Remove iconSize parameter from ActionButtons and update docs

* Fix failing tests

* Update button color during backbutton tests to red

* Fix analytics issues

* Fix format
Fix `ExpansionTile` double tap to collapse/expanded and expanded/collapsed states semantics announcements
Enderjua and others added 5 commits January 23, 2026 21:28
…ession (#181398)

Continuing the effort to clean up some of the older switch statements,
I've moved over to `typography.dart`

I found that `Typography._withPlatform` was using a standard switch
block to handle platform-specific theme assignments. Since both `black`
and `white` themes are resolved based on the same platform variable,
I've refactored this into a single switch expression using a Record.
This allowed me to group Android and Fuchsia together using the new
logical OR pattern, which feels much cleaner.

The logic and the existing fallbacks haven't changed at all—the `assert`
at the start already guarantees we have the required themes if the
platform is null, so I've handled that case directly in the expression.

I've run the local tests in `typography_test.dart` and everything is
passing.

## 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]. (I will sign it once the bot prompts me)
- [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.

[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#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/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
…documentation examples (#183074)

This PR replaces usages of `BorderRadius.circular(double radius)` with
`const BorderRadius.all(Radius.circular(radius))` (and similarly for
`BorderRadiusDirectional` and `BorderRadiusGeometry`) to improve code
consistency and enable const constructors where applicable.

Additionally, all code examples in the documentation have been updated
to reflect this pattern, ensuring that developers see the recommended
style.

## 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].
- [ ] I listed at least one issue that this PR fixes in the description
above.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [ ] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [ ] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [ ] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

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

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#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/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
Migrates code in `examples/api/lib/material` to use dot shorthands.

Part of: flutter/flutter#175965
See also: [Dot shorthands style
guide](https://github.com/flutter/flutter/blob/master/docs/contributing/Style-guide-for-Flutter-repo.md#use-dot-shorthands-to-reduce-redundant-information)
See also: [A write-up on my migration
process](dart-lang/sdk#61957 (comment)).

Stacked pull requests:
* flutter/flutter#183963
* flutter/flutter#183964
* flutter/flutter#183965
* flutter/flutter#183966
* flutter/flutter#183967

## 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 documentation (doc comments with `///`).
- [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.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

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

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[AI contribution guidelines]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#ai-contribution-guidelines
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#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/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
…rogress-indicator

Merging in progress indicator examples from flutter/flutter.
Is this the directory structure we want?
@justinmc justinmc self-assigned this Apr 17, 2026
@github-actions github-actions bot added triage-framework Should be looked at in framework triage p: material_ui labels Apr 17, 2026
@google-cla
Copy link
Copy Markdown

google-cla bot commented Apr 17, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

…rogress-indicator

Bringing in main progress_indicator.dart source
@justinmc
Copy link
Copy Markdown
Contributor Author

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

I think this bot comment is because one or more of the committers in the history that I copied in has not signed the CLA, even though I have.

@justinmc justinmc mentioned this pull request Apr 20, 2026
4 tasks
@stuartmorgan-g
Copy link
Copy Markdown
Collaborator

I think this bot comment is because one or more of the committers in the history that I copied in has not signed the CLA, even though I have.

Yes, every commit's author is checked. The standard way we do this for imports is to use the built-in cla/google override mechanism once we are ready to land a PR, with an explanation that it's an import for a repo that was already enforcing the CLA.

@justinmc
Copy link
Copy Markdown
Contributor Author

From discussion on #11543, it seems that we'll have to do everything in a single mega PR to avoid duplicate commits. So I'll close this PR.

I'll make a note on the new mega PR about overriding the CLA check, thanks for the explanation.

@justinmc justinmc closed this Apr 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

p: material_ui triage-framework Should be looked at in framework triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.