Skip to content

Commit

Permalink
fix: RecycleQueue cannot extends and implements Iterable at the same …
Browse files Browse the repository at this point in the history
…time (#2497)

Implementing and extending the iterable interface/mixin at the same time breaks Flame in the current beta channel (3.10...).

This PR removes the implementation of the interface to get flame ready for the next flutter release.
  • Loading branch information
erickzanardo committed Apr 14, 2023
1 parent a66f2bc commit 3e5be3d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/flame/lib/src/components/core/recycled_queue.dart
Expand Up @@ -21,7 +21,7 @@ import 'dart:math';
///
/// Internally, the queue is backed by a circular list.
class RecycledQueue<T extends Disposable> extends IterableMixin<T>
implements Iterable<T>, Iterator<T> {
implements Iterator<T> {
RecycledQueue(this.factory, {int initialCapacity = 8})
: _elements = List.generate(initialCapacity, (i) => factory()),
_startIndex = -1,
Expand Down

0 comments on commit 3e5be3d

Please sign in to comment.