Only return active effects

This commit is contained in:
Lukas Klingsbo
2020-11-01 15:06:52 +01:00
parent 84ca546ccb
commit 73f4dfd673
2 changed files with 5 additions and 4 deletions

View File

@ -84,5 +84,7 @@ abstract class Component {
}
/// Get a copy of the list of non removed effects
List<ComponentEffect> get effects => List<ComponentEffect>.from(_effects);
List<ComponentEffect> get effects {
return List<ComponentEffect>.from(_effects)..where((e) => !e.hasFinished());
}
}