-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Replace deprecated withOpacity with withValues in text_style.dart
#177537
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
Merged
Conversation
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
withOpacity with withValues in text_style.dart
victorsanni
approved these changes
Oct 27, 2025
justinmc
approved these changes
Oct 29, 2025
Contributor
justinmc
left a comment
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.
LGTM 👍 . The Google tests failure was an infrastructure flake.
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Oct 29, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Oct 29, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Oct 29, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Oct 29, 2025
auto-submit bot
pushed a commit
to flutter/packages
that referenced
this pull request
Oct 29, 2025
flutter/flutter@7cf0dc1...df72035 2025-10-29 [email protected] Roll Packages from c8ba0cc to 41c6b3d (3 revisions) (flutter/flutter#177725) 2025-10-29 [email protected] [Android] Remove unecessary `spy` in `FlutterActivityAndFragmentDelegateTest` (flutter/flutter#177120) 2025-10-29 [email protected] Add discussion of federated plugin documentation (flutter/flutter#177659) 2025-10-29 [email protected] [web] Deprecate --pwa-strategy (flutter/flutter#177613) 2025-10-29 [email protected] Roll Skia from 53b8b802bbc4 to 0a0c9f8c704f (1 revision) (flutter/flutter#177701) 2025-10-29 [email protected] Add `Navigator.popUntilWithResult` (flutter/flutter#169341) 2025-10-29 [email protected] Replace deprecated `withOpacity` with `withValues` in `text_style.dart` (flutter/flutter#177537) 2025-10-29 [email protected] Replace deprecated withOpacity in `radio.1.dart` example (flutter/flutter#177606) 2025-10-29 [email protected] Roll Skia from 4408d8ea88b0 to 53b8b802bbc4 (2 revisions) (flutter/flutter#177698) 2025-10-29 [email protected] Remove generated file from template manifest (flutter/flutter#177034) 2025-10-29 [email protected] Roll Skia from e582a5594b6f to 4408d8ea88b0 (5 revisions) (flutter/flutter#177691) 2025-10-28 [email protected] Roll Fuchsia Linux SDK from ir6J2isKAYa1jNLyJ... to 3EF6k6lqXPWDwrdyj... (flutter/flutter#177682) 2025-10-28 [email protected] [Gradle 9] Fix Engine Deps (flutter/flutter#177623) 2025-10-28 [email protected] Replace deprecated `withOpacity` in `focus_scope.0.dart` example (flutter/flutter#177542) 2025-10-28 [email protected] Fix EditableText _justResumed is not accurate (flutter/flutter#177658) 2025-10-28 [email protected] Replace deprecated `withOpacity` in `interactive_viewer.builder.0.dart` (flutter/flutter#177541) 2025-10-28 [email protected] Fix TextButton.icon breaks focus traversal and ink effect when toggling icon (flutter/flutter#176579) 2025-10-28 [email protected] [Android 16] Update Engine `ci.yaml` to test against Java 21 (flutter/flutter#177677) 2025-10-28 [email protected] Replace deprecated `withOpacity` in `interactive_viewer.constrained.0.dart` (flutter/flutter#177540) 2025-10-28 [email protected] Replace opacity from random color in navigation bar test (flutter/flutter#177490) 2025-10-28 [email protected] Roll Skia from e4d3d8f31aef to e582a5594b6f (6 revisions) (flutter/flutter#177679) 2025-10-28 [email protected] Workaround for lag when dragging window titlebar on Windows (flutter/flutter#177597) 2025-10-28 [email protected] Roll Packages from bbf96a0 to c8ba0cc (2 revisions) (flutter/flutter#177672) 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 Please CC [email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Packages: 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
walley892
pushed a commit
to walley892/flutter
that referenced
this pull request
Oct 30, 2025
…t` (flutter#177537) Replaces the usage of deprecated `withOpacity(value)` to `withValues(alpha: value)` in `packages/flutter/lib/src/painting/text_style.dart` comments. Similar PRs: - flutter#177374 - flutter#177490 - flutter#177540 - flutter#177541 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. - [x] I updated/added relevant documentation (doc comments with `///`). - [ ] I listed at least one issue that this PR fixes in the description above. - [ ] I added new tests to check the change I am making, or this PR is [test-exempt]. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. **Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the `gemini-code-assist` bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
reidbaker
pushed a commit
to AbdeMohlbi/flutter
that referenced
this pull request
Dec 10, 2025
…t` (flutter#177537) Replaces the usage of deprecated `withOpacity(value)` to `withValues(alpha: value)` in `packages/flutter/lib/src/painting/text_style.dart` comments. Similar PRs: - flutter#177374 - flutter#177490 - flutter#177540 - flutter#177541 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. - [x] I updated/added relevant documentation (doc comments with `///`). - [ ] I listed at least one issue that this PR fixes in the description above. - [ ] I added new tests to check the change I am making, or this PR is [test-exempt]. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. **Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the `gemini-code-assist` bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
a: text input
Entering text in a text field or keyboard related problems
framework
flutter/packages/flutter repository. See also f: labels.
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.
Replaces the usage of deprecated
withOpacity(value)towithValues(alpha: value)inpackages/flutter/lib/src/painting/text_style.dartcomments.Similar PRs:
deprecatedwithOpacity intext_button.0.dartin examples #177374withOpacityininteractive_viewer.constrained.0.dart#177540withOpacityininteractive_viewer.builder.0.dart#177541Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.
Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the
gemini-code-assistbot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.