mirror of
https://github.com/flame-engine/flame.git
synced 2025-10-31 00:48:47 +08:00
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:
@ -106,13 +106,13 @@ class SelectableClass extends SpriteComponent {
|
||||
super.size,
|
||||
super.key,
|
||||
super.sprite,
|
||||
}) : super(paint: Paint()..color = Colors.white.withOpacity(0.5));
|
||||
}) : super(paint: Paint()..color = Colors.white.withValues(alpha: 0.5));
|
||||
|
||||
bool _selected = false;
|
||||
bool get selected => _selected;
|
||||
set selected(bool value) {
|
||||
_selected = value;
|
||||
paint = Paint()
|
||||
..color = value ? Colors.white : Colors.white.withOpacity(0.5);
|
||||
..color = value ? Colors.white : Colors.white.withValues(alpha: 0.5);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user