Skip to content

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

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

sneurlax wants to merge 6 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 13.30166% with 730 lines in your changes missing coverage. Please review.
✅ Project coverage is 13.90%. Comparing base (9ce80be) to head (9feb0fb).
⚠️ Report is 1 commits behind head on staging.

Files with missing lines Patch % Lines
...rk_settings_view/wallet_network_settings_view.dart 0.00% 82 Missing ⚠️
..._view/wallet_view/sub_widgets/desktop_receive.dart 0.00% 59 Missing ⚠️
...e/subwidgets/desktop_exchange_steps_indicator.dart 0.00% 46 Missing ⚠️
...ages/token_view/sub_widgets/token_summary_sol.dart 0.00% 45 Missing ⚠️
lib/pages_desktop_specific/desktop_menu_item.dart 0.00% 43 Missing ⚠️
lib/widgets/date_picker/date_picker.dart 0.00% 37 Missing ⚠️
...ings_view/stack_backup_views/auto_backup_view.dart 0.00% 34 Missing ⚠️
...ib/pages/token_view/sub_widgets/token_summary.dart 0.00% 31 Missing ⚠️
...w/wallet_view/sub_widgets/network_info_button.dart 0.00% 28 Missing ⚠️
...s/wallet_view/sub_widgets/wallet_summary_info.dart 0.00% 26 Missing ⚠️
... and 38 more
Additional details and impacted files
@@             Coverage Diff             @@
##           staging    #1376      +/-   ##
===========================================
- Coverage    13.92%   13.90%   -0.03%     
===========================================
  Files         1139     1139              
  Lines       114707   114838     +131     
===========================================
- Hits         15976    15969       -7     
- Misses       98731    98869     +138     

☔ View full report in Codecov by Harness.
📢 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
Formatter output only, no semantic change. Keeps the deprecation
migration that follows a mechanical diff, since 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`.
@sneurlax

Copy link
Copy Markdown
Member Author

Updated against staging d29d84c66049 and pushed the same descendant to both remotes. Resolved conflicts by applying the color API migration to current staging files, preserving subsequent wallet and UI changes. Verified all 52 affected Dart files contain only the intended .withOpacity(...) → .withValues(alpha: ...) replacement and current formatter changes.

Validation: the full Flutter test suite passed (891 passed, 8 skipped); changed-file formatting and whitespace checks passed. Static analysis found no errors, with existing warnings and informational lints remaining. Tests used the repository's available Linux native libraries; visual/device checks were not performed.

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