chore: Update usages of Dart UI Color to not use deprecated fields and methods [flame_3d] (#3297)

Update usages of Dart UI Color to not use deprecated fields and methods.
On latest main of Flutter these will cause lint errors, [as can be seen
here](https://github.com/flame-engine/flame/actions/runs/10814047130/job/29999530293?pr=3282).

Note: I will update the `flame_3d`-specific violations on a followup.
This commit is contained in:
Luan Nico
2024-09-11 23:31:28 +02:00
parent 5f25423f68
commit 27e4dcb65a
30 changed files with 138 additions and 129 deletions

View File

@ -30,7 +30,7 @@ class TapCallbacksSquare extends RectangleComponent with TapCallbacks {
position: position ?? Vector2.all(100),
size: Vector2.all(100),
paint: continuePropagation
? (Paint()..color = Colors.green.withOpacity(0.9))
? (Paint()..color = Colors.green.withValues(alpha: 0.9))
: PaintExtension.random(withAlpha: 0.9, base: 100),
);