Skip to content

refactor: migrate deprecated .withOpacity() to .withValues(alpha:) - #1376

Draft
sneurlax wants to merge 2 commits into
stagingfrom
refactor/withopacity-to-withvalues
Draft

refactor: migrate deprecated .withOpacity() to .withValues(alpha:)#1376
sneurlax wants to merge 2 commits into
stagingfrom
refactor/withopacity-to-withvalues

Conversation

@sneurlax

Copy link
Copy Markdown
Member

No description provided.

@codecov

codecov Bot commented May 28, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 11.22995% with 498 lines in your changes missing coverage. Please review.
✅ Project coverage is 4.81%. Comparing base (8208fe7) to head (de9f7df).
⚠️ Report is 11 commits behind head on staging.

Files with missing lines Patch % Lines
...in_selection/exchange_currency_selection_view.dart 0.00% 62 Missing ⚠️
lib/widgets/toggle.dart 0.00% 45 Missing ⚠️
...e/subwidgets/desktop_exchange_steps_indicator.dart 0.00% 42 Missing ⚠️
...s/wallet_navigation_bar/wallet_navigation_bar.dart 0.00% 28 Missing ⚠️
...ages/token_view/sub_widgets/token_summary_sol.dart 0.00% 27 Missing ⚠️
...w/wallet_view/sub_widgets/network_info_button.dart 0.00% 26 Missing ⚠️
...s/wallet_view/sub_widgets/wallet_summary_info.dart 0.00% 22 Missing ⚠️
...exchange_view/exchange_step_views/step_3_view.dart 0.00% 17 Missing ⚠️
lib/widgets/managed_favorite.dart 0.00% 16 Missing ⚠️
...preferences_views/wallet_syncing_options_view.dart 0.00% 15 Missing ⚠️
... and 38 more
Additional details and impacted files
@@             Coverage Diff             @@
##           staging    #1376      +/-   ##
===========================================
- Coverage     4.84%    4.81%   -0.03%     
===========================================
  Files         1092     1092              
  Lines       109141   109063      -78     
===========================================
- Hits          5283     5251      -32     
+ Misses      103858   103812      -46     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sneurlax

Copy link
Copy Markdown
Member Author

Converting to draft because I have too many open PRs ready--will take another review pass over this before re-readying it

@sneurlax
sneurlax marked this pull request as draft August 20, 2026 18:58
Formatter output only, no semantic change. 29 of these 52 files predate the
current formatter; normalising them first keeps the deprecation migration that
follows a purely mechanical diff, and the CI format gate checks every .dart
file a PR touches.
`Color.withOpacity` is deprecated in the pinned Flutter SDK. `withValues`
stores alpha as a double instead of quantising it to 8 bits; `toARGB32()`
rounds to the same byte for every alpha, so nothing renders differently.

83 call sites in 52 files. Reproducible from the preceding commit: substitute
`.withOpacity(X)` -> `.withValues(alpha: X)` and run `dart format`, which
rewraps the 12 sites (10 files) where the longer name no longer fits the line.
@sneurlax
sneurlax force-pushed the refactor/withopacity-to-withvalues branch from 0a12816 to a4d12bc Compare August 25, 2026 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant