MaterialColor canot be compared directly with Color type #69162
Labels
f: material design
flutter/packages/flutter/material repository.
framework
flutter/packages/flutter repository. See also f: labels.
in triage
Presently being triaged by the triage team
@shihaohong Hi,
Continue of #68171 (comment)
flutter/packages/flutter/lib/src/material/theme_data.dart
Line 348 in f551178
I believe this should be a typo instead of accentColor.value == primaryColor.value.
Most of the time,
primaryColor
is MaterialColor type andaccentColor
is Color type. They cannot be compared directly with ==, otherwise, it will not be the expected result.Fix this typo will break somethings, but it doesn’t seem right if you let it as-is. It’s really a tricky problem.
The text was updated successfully, but these errors were encountered: