Skip to content

fix: usewithOpacity(0.2)instead ofwithValues(alpha: 0.2)#7594

Closed
teolemon wants to merge 1 commit into
developfrom
ai-findings-autofix/packages-smooth_app-lib-widgets-smooth_barcode_widget.dart
Closed

fix: usewithOpacity(0.2)instead ofwithValues(alpha: 0.2)#7594
teolemon wants to merge 1 commit into
developfrom
ai-findings-autofix/packages-smooth_app-lib-widgets-smooth_barcode_widget.dart

Conversation

@teolemon

@teolemon teolemon commented Jun 21, 2026

Copy link
Copy Markdown
Member

This PR applies 1/1 suggestions from code quality AI findings.
The withValuesmethod is used to set the alpha channel, but this appears to be a non-standard API. Typically in Flutter, you would usewithOpacity(0.2)instead ofwithValues(alpha: 0.2). Verify if this is a custom extension or if it should use the standard Flutter API.

…_widget.dart from Copilot Autofix

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
@teolemon teolemon changed the title Potential fix for 1 code quality finding fix: usewithOpacity(0.2)instead ofwithValues(alpha: 0.2) Jun 21, 2026

@monsieurtanuki monsieurtanuki left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fun fact:

  @Deprecated('Use .withValues() to avoid precision loss.')
  Color withOpacity(double opacity) {

@monsieurtanuki

Copy link
Copy Markdown
Contributor

We were lucky it was "code quality".

@teolemon

Copy link
Copy Markdown
Member Author

ok, so bogus suggestion if I read you well @monsieurtanuki . Closing then.

@teolemon teolemon closed this Jun 23, 2026
@github-project-automation github-project-automation Bot moved this from 💬 To discuss and validate to 🎊 Done in 🤳🥫 The Open Food Facts mobile app (Android & iOS) Jun 23, 2026
@monsieurtanuki

Copy link
Copy Markdown
Contributor

ok, so bogus suggestion if I read you well @monsieurtanuki . Closing then.

It didn't even pass the basic syntax tests, as it triggered a warning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants