Repository navigation
Closed
Labels
found in release: 3.47Found to occur in 3.47Found to occur in 3.47has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onp: material_uimaterial_ui package in flutter/packagesmaterial_ui package in flutter/packagespackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.team-designOwned by Design Languages teamOwned by Design Languages team
Description
Steps to reproduce
import 'package:dynamic_color/dynamic_color.dart';
import 'package:material_ui/material_ui.dart';
void main() {
runApp(const ReproApp());
}
class ReproApp extends StatelessWidget {
const ReproApp({super.key});
@override
Widget build(BuildContext context) {
return DynamicColorBuilder(
builder: (lightDynamic, darkDynamic) {
return MaterialApp(
theme: ThemeData(colorScheme: lightDynamic),
darkTheme: ThemeData(colorScheme: darkDynamic),
home: const Scaffold(
body: Center(
child: Text('dynamic_color + material_ui reproduction'),
),
),
);
},
);
}
}Expected results
The application build success.
Actual results
The application fails static analysis.
Code sample
Code sample
[Paste your code here]Screenshots or Video
Screenshots / Video demonstration
[Upload media here]
Logs
Logs
[Paste your logs here]Flutter Doctor output
Doctor output
[✓] Flutter (Channel stable, 3.47.0, on Microsoft Windows [版本 10.0.26200.9168], locale zh-CN) [334ms]
• Flutter version 3.47.0 on channel stable at D:\Dev\Environment\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 4cf2416426 (2 days ago), 2026-08-11 11:53:49 -0700
• Engine revision 5f77625673
• Dart version 3.13.0
• DevTools version 2.60.0
• Feature flags: enable-web, enable-linux-desktop, enable-macos-desktop, enable-windows-desktop, enable-android,
enable-ios, cli-animations, enable-native-assets, enable-record-use, enable-swift-package-manager,
omit-legacy-version-file, enable-lldb-debugging, enable-uiscene-migration
[✓] Windows Version (Windows 11 or higher, 25H2, 2009) [1,363ms]
[✓] Android toolchain - develop for Android devices (Android SDK version 36.1.0) [9.0s]
• Android SDK at C:\Users\admin\AppData\Local\Android\Sdk
• Emulator version 36.6.11.0 (build_id 15507667) (CL:N/A)
• Platform android-36.1, build-tools 36.1.0
• ANDROID_HOME = C:\Users\admin\AppData\Local\Android\Sdk
• ANDROID_SDK_ROOT = C:\Users\admin\AppData\Local\Android\Sdk
• Java binary at: C:\Program Files\Android\Android Studio\jbr\bin\java
This is the JDK bundled with the latest Android Studio installation on this machine.
To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`.
• Java version OpenJDK Runtime Environment (build 21.0.10+-14961533-b1163.108)
• All Android licenses accepted.
[✓] Chrome - develop for the web [122ms]
• Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe
[✓] Visual Studio - develop Windows apps (Visual Studio 生成工具 2026 18.6.2) [121ms]
• Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\18\BuildTools
• Visual Studio 生成工具 2026 version 18.6.11822.322
• Windows 10 SDK version 10.0.26100.0
[✓] Connected device (3 available) [408ms]
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [版本 10.0.26200.9168]
• Chrome (web) • chrome • web-javascript • Google Chrome 151.0.7922.110
• Edge (web) • edge • web-javascript • Microsoft Edge 150.0.4078.48
[✓] Network resources [1,889ms]
• All expected network resources are available.
• No issues found!Reacted by Piotr Rogulski
Metadata
Metadata
Assignees
Labels
found in release: 3.47Found to occur in 3.47Found to occur in 3.47has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onp: material_uimaterial_ui package in flutter/packagesmaterial_ui package in flutter/packagespackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.team-designOwned by Design Languages teamOwned by Design Languages team
Activity
saurabh-mirajkar commentedon Aug 13, 2026
@Predidit Thanks for the report. Could you provide the complete code sample, full error logs and the
dynamic_colorandmaterial_uiversions you're using?Predidit commentedon Aug 13, 2026
@saurabh-mirajkar
Thanks for the follow up.
The issue occurs during static analysis, before the application can be built or
run, so there are no runtime logs. Below is the complete minimal reproduction,
including its dependency versions.
Tested versions:
dynamic_color: 1.9.0material_ui: 1.0.0pubspec.yaml:lib/main.dart:Reproduction commands:
saurabh-mirajkar commentedon Aug 13, 2026
@Predidit Thanks for providing additional details. I was able to reproduce this on latest stable (3.47). Labeling this accordingly and passing it on for further triage.
Piinks commentedon Aug 13, 2026
The compatibility bridge should be able to help with this, it will map over ThemeData properties to cover the gap for dependencies that have not migrated yet.
dynamic_color needs to be migrated to use the new design packages, which will ultimately fix this.
Predidit commentedon Aug 14, 2026
@Piinks
Thanks for the clarification.
My understanding is that the compatibility bridge maps a modern
material_ui.ThemeDatato a legacyflutter/material.dartThemeDataforlegacy widgets below the bridge. That works for dependencies which consume
theme data from their surrounding widget tree.
However,
dynamic_coloris different: the application does not provide aColorSchemeorThemeDatato it. Instead,DynamicColorBuilderproduces andpasses two legacy
flutter/material.dartColorScheme?values back to theapplication through its callback.
I agree that migrating
dynamic_colorto the new design package wouldultimately fix the issue. Alternatively, a temporary reverse conversion API
from the legacy
ColorSchemetomaterial_ui.ColorSchemecould provide amigration path.
If there is another intended way to arrange the compatibility bridge so that it
can convert values returned by
DynamicColorBuilder, I would be happy to testit.
Piinks commentedon Aug 14, 2026
Hmm, this may be better filed in the dynamic_color issue tracker: https://github.com/material-foundation/flutter-packages/issues?q=sort%3Aupdated-desc+is%3Aissue+state%3Aopen+
The package itself is not currently owned or maintained by the Flutter team, and material_ui does not depend on it either.
Predidit commentedon Aug 15, 2026
material-foundation/flutter-packages#698
dkwingsmt commentedon Aug 19, 2026
In that case I'm closing this issue for now. Thanks for filing the issue there!
github-actions commentedon Sep 2, 2026
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.