chore: Migrate decoupling - #4066
Merged
Merged
Conversation
spydon
approved these changes
Sep 29, 2026
spydon
left a comment
Member
There was a problem hiding this comment.
Great, lgtm! Can you just fix the analyzer error?
Dashbook uses material.dart, so its themeData parameter expects a ThemeData from the SDK and won't accept one from material_ui. To avoid needing to migrate them too, I have left off the parameter, changing the examples to light mode.
justinmc
commented
Sep 29, 2026
spydon
enabled auto-merge (squash)
September 29, 2026 21:28
Contributor
|
For some packages I don't think material_ui is necessary as a dependency. It just was material by default before. But seeing that this has been merged already we'll have to tidy up that later. |
Member
That's true, feel free to submit a PR if you want to. :) |
5 of 6 tasks
spydon
pushed a commit
that referenced
this pull request
Sep 30, 2026
Removes dependency material_ui introduced by #4066 on a few packages where foundation.dart or widgets.dart in the framework provide the same functionality as via material_ui package. Some examples and tests still uses material_ui. There are also packages which depend on material_ui for Colors which I haven't touched (yet).
5 of 6 tasks
spydon
pushed a commit
that referenced
this pull request
Sep 30, 2026
Removes dependency material_ui introduced by #4066 in flame_console package by extracting white and black from Colors class.
5 of 6 tasks
spydon
added a commit
that referenced
this pull request
Sep 30, 2026
## Description The decoupling migration in #4066 added `material_ui: any` to every package. `dart pub publish` refuses an unconstrained dependency, so the `Prepare release` workflow fails during the dry run: https://github.com/flame-engine/flame/actions/runs/36740924859/job/109974817579 This constrains it to `^1.0.0` everywhere. All packages already require Flutter `>=3.44.0`, which is the first stable that ships with `material_ui` 1.x, so this matches the existing environment without narrowing it further. The resolved version in the lockfile is unchanged. ## Checklist - [x] I have followed the [Contributor Guide] when preparing my PR. - [x] I have updated/added tests for ALL new/updated/fixed functionality. - [x] I have updated/added relevant documentation in `docs` and added dartdoc comments with `///`. - [x] I have updated/added relevant examples in `examples` or `docs`. ## Breaking Change? - [ ] Yes, this PR is a breaking change. - [x] No, this PR is not a breaking change. [Contributor Guide]: https://github.com/flame-engine/flame/blob/main/CONTRIBUTING.md
11 tasks done
SERDUN
added a commit
to SERDUN/flame
that referenced
this pull request
Oct 1, 2026
On Flutter 3.47 dashbook 0.1.19 takes ThemeData from material_ui, so passing it the framework's ThemeData failed to compile and the examples app did not build at all. Taken from upstream 76c8e81 (flame-engine#4066): main.dart imports material_ui and dashbook keeps its own theme.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
It was discovered in flutter/flutter#192957 that flame is blocking the framework from deprecating Material because of its customer tests. If we're not able to resolve the failure in the next few days we'll have to disable the customer tests temporarily until it's fixed. This PR should solve the problem, though.
Checklist
docsand added dartdoc comments with///.examplesordocs.Breaking Change?
It is possible that this breaks users that have not migrated themselves, for example if Flame ever does something like
if (myParameter is TextButton) {...where TextButton comes from material_ui.dart, but a user passed in a TextButton from material.dart.Migration instructions
The migration instructions are the same for non-Flame apps: https://docs.flutter.dev/release/breaking-changes/material-ui-and-cupertino-ui
Related Issues
flutter/flutter#192957
flutter/tests#497
rrousselGit/provider#924