Skip to content

Commit

Permalink
code review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
Taormina committed Dec 2, 2024
1 parent 98612d7 commit bcd5729
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/flame/lib/src/rendering/shadow3d_decorator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ class Shadow3DDecorator extends Decorator {
Paint? _paint;
Paint _makePaint() {
final paint = Paint();
final color = baseColor.withAlpha((opacity * 255).toInt());
final color = baseColor.withValues(alpha: opacity);

Check failure on line 134 in packages/flame/lib/src/rendering/shadow3d_decorator.dart

View workflow job for this annotation

GitHub Actions / analyze-latest

The method 'withValues' isn't defined for the type 'Color'.

Try correcting the name to the name of an existing method, or defining a method named 'withValues'. See https://dart.dev/diagnostics/undefined_method to learn more about this problem.

Check failure on line 134 in packages/flame/lib/src/rendering/shadow3d_decorator.dart

View workflow job for this annotation

GitHub Actions / analyze

The method 'withValues' isn't defined for the type 'Color'.

Try correcting the name to the name of an existing method, or defining a method named 'withValues'. See https://dart.dev/diagnostics/undefined_method to learn more about this problem.
paint.colorFilter = ColorFilter.mode(color, BlendMode.srcIn);
if (_blur > 0) {
paint.imageFilter = ImageFilter.blur(sigmaX: blur, sigmaY: blur / _scale);
Expand Down
Binary file modified packages/flame/test/_goldens/shadow3d_decorator_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion packages/flame/test/rendering/shadow3d_decorator_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ void main() {
..xShift = 250.0
..yScale = 1.5
..opacity = 0.4
..blur = 1.0,
..blur = 1.0
..baseColor = BasicPalette.red.color,
),
]);
},
Expand Down

0 comments on commit bcd5729

Please sign in to comment.