diff --git a/packages/flame/lib/src/components/core/component_set.dart b/packages/flame/lib/src/components/core/component_set.dart index 74f32927696..61cd5a94938 100644 --- a/packages/flame/lib/src/components/core/component_set.dart +++ b/packages/flame/lib/src/components/core/component_set.dart @@ -36,12 +36,32 @@ class ComponentSet extends QueryableOrderedSet { @override bool add(Component component) => super.add(component); + /// Marked as internal, because the users shouldn't be able to add elements + /// into the [ComponentSet] directly, bypassing the normal lifecycle handling. + @internal + @override + int addAll(Iterable components) => super.addAll(components); + /// Marked as internal, because the users shouldn't be able to remove elements /// from the [ComponentSet] directly, bypassing the normal lifecycle handling. @internal @override bool remove(Component component) => super.remove(component); + /// Marked as internal, because the users shouldn't be able to remove elements + /// from the [ComponentSet] directly, bypassing the normal lifecycle handling. + @internal + @override + Iterable removeAll(Iterable components) => + super.removeAll(components); + + /// Marked as internal, because the users shouldn't be able to remove elements + /// from the [ComponentSet] directly, bypassing the normal lifecycle handling. + @internal + @override + Iterable removeWhere(bool Function(Component element) test) => + super.removeWhere(test); + /// Marked as internal, because the users shouldn't be able to remove elements /// from the [ComponentSet] directly, bypassing the normal lifecycle handling. @internal