Skip to content

Conversation

@stuartmorgan-g
Copy link
Collaborator

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

Pre-Review Checklist

Footnotes

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

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
@github-actions github-actions bot added p: vector_graphics p: flutter_svg triage-engine Should be looked at in engine triage labels Nov 20, 2025
@stuartmorgan-g stuartmorgan-g changed the title [various] Replace deprecated Color.value in SVG packgaes [various] Replace deprecated Color.value in SVG packages Nov 20, 2025
Copy link

@gemini-code-assist gemini-code-assist bot left a 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').

@stuartmorgan-g stuartmorgan-g added the autosubmit Merge PR when tree becomes green via auto submit App label Nov 21, 2025
@auto-submit auto-submit bot merged commit 22c6056 into flutter:main Nov 21, 2025
80 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 21, 2025
github-merge-queue bot pushed a commit to flutter/flutter that referenced this pull request Nov 21, 2025
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
okorohelijah pushed a commit to okorohelijah/flutter that referenced this pull request Nov 21, 2025
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
mboetger pushed a commit to mboetger/flutter that referenced this pull request Dec 2, 2025
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
reidbaker pushed a commit to AbdeMohlbi/flutter that referenced this pull request Dec 10, 2025
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App p: flutter_svg p: vector_graphics triage-engine Should be looked at in engine triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants