-
Notifications
You must be signed in to change notification settings - Fork 3.6k
[various] Replace deprecated Color.value in SVG packages #10482
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[various] Replace deprecated Color.value in SVG packages #10482
Conversation
Replaces the deprecated `Color.value` with the equivalent `toARGB()`. While this method is discouraged for many use cases, since it's for interacting with the `vector_graphics` `Color` class, which uses a 32-bit ARGB value as its fundamental representation, this appears to be the correct replacement. Part of flutter/flutter#159739
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request correctly replaces the deprecated ui.Color.value with ui.Color.toARGB32() in the vector_graphics and flutter_svg packages to resolve a deprecation. The changes are straightforward and correct. The corresponding version and changelog updates are also included. The changes look good to me.
As a minor note, there is a typo in the pull request title ('packgaes' instead of 'packages').
flutter/packages@b1e2fb0...e67b6be 2025-11-21 [email protected] [file_selector] Implement canCreateDirectories on macos and linux (flutter/packages#10443) 2025-11-21 [email protected] [various] Replace deprecated Color.value in SVG packages (flutter/packages#10482) 2025-11-20 [email protected] [pigeon] Fixes compilation error with unbounded type parameter for InstanceManager (flutter/packages#10483) 2025-11-20 [email protected] [webview_flutter] Replace deprecated Color.value (flutter/packages#10480) 2025-11-20 [email protected] [google_maps_flutter] Replace deprecated color APIs in platform interface (flutter/packages#10477) 2025-11-20 [email protected] Roll Flutter (stable) from b45fa18 to f5a8537 (12 revisions) (flutter/packages#10478) 2025-11-20 [email protected] Roll Flutter from de4be4f to 9f383e0 (21 revisions) (flutter/packages#10481) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC [email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
flutter/packages@b1e2fb0...e67b6be 2025-11-21 [email protected] [file_selector] Implement canCreateDirectories on macos and linux (flutter/packages#10443) 2025-11-21 [email protected] [various] Replace deprecated Color.value in SVG packages (flutter/packages#10482) 2025-11-20 [email protected] [pigeon] Fixes compilation error with unbounded type parameter for InstanceManager (flutter/packages#10483) 2025-11-20 [email protected] [webview_flutter] Replace deprecated Color.value (flutter/packages#10480) 2025-11-20 [email protected] [google_maps_flutter] Replace deprecated color APIs in platform interface (flutter/packages#10477) 2025-11-20 [email protected] Roll Flutter (stable) from b45fa18 to f5a8537 (12 revisions) (flutter/packages#10478) 2025-11-20 [email protected] Roll Flutter from de4be4f to 9f383e0 (21 revisions) (flutter/packages#10481) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC [email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
flutter/packages@b1e2fb0...e67b6be 2025-11-21 [email protected] [file_selector] Implement canCreateDirectories on macos and linux (flutter/packages#10443) 2025-11-21 [email protected] [various] Replace deprecated Color.value in SVG packages (flutter/packages#10482) 2025-11-20 [email protected] [pigeon] Fixes compilation error with unbounded type parameter for InstanceManager (flutter/packages#10483) 2025-11-20 [email protected] [webview_flutter] Replace deprecated Color.value (flutter/packages#10480) 2025-11-20 [email protected] [google_maps_flutter] Replace deprecated color APIs in platform interface (flutter/packages#10477) 2025-11-20 [email protected] Roll Flutter (stable) from b45fa18 to f5a8537 (12 revisions) (flutter/packages#10478) 2025-11-20 [email protected] Roll Flutter from de4be4f to 9f383e0 (21 revisions) (flutter/packages#10481) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC [email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
flutter/packages@b1e2fb0...e67b6be 2025-11-21 [email protected] [file_selector] Implement canCreateDirectories on macos and linux (flutter/packages#10443) 2025-11-21 [email protected] [various] Replace deprecated Color.value in SVG packages (flutter/packages#10482) 2025-11-20 [email protected] [pigeon] Fixes compilation error with unbounded type parameter for InstanceManager (flutter/packages#10483) 2025-11-20 [email protected] [webview_flutter] Replace deprecated Color.value (flutter/packages#10480) 2025-11-20 [email protected] [google_maps_flutter] Replace deprecated color APIs in platform interface (flutter/packages#10477) 2025-11-20 [email protected] Roll Flutter (stable) from b45fa18 to f5a8537 (12 revisions) (flutter/packages#10478) 2025-11-20 [email protected] Roll Flutter from de4be4f to 9f383e0 (21 revisions) (flutter/packages#10481) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC [email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Replaces the deprecated
Color.valuewith the equivalenttoARGB(). While this method is discouraged for many use cases, since it's for interacting with thevector_graphicsColorclass, which uses a 32-bit ARGB value as its fundamental representation, this appears to be the correct replacement.Part of flutter/flutter#159739
Pre-Review Checklist
[shared_preferences]pubspec.yamlwith an appropriate new version according to the pub versioning philosophy, or I have commented below to indicate which version change exemption this PR falls under1.CHANGELOG.mdto add a description of the change, following repository CHANGELOG style, or I have commented below to indicate which CHANGELOG exemption this PR falls under1.///).Footnotes
Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. ↩ ↩2 ↩3