refactor: removed children parameter

pull/312/head
alestiago 3 years ago
parent 6c4519ae95
commit 6883e9b81e

@ -31,9 +31,7 @@ class Flapper extends Component {
/// ///
/// This can be used for testing [Flapper]'s behaviors in isolation. /// This can be used for testing [Flapper]'s behaviors in isolation.
@visibleForTesting @visibleForTesting
Flapper.test({ Flapper.test();
Iterable<Component>? children,
}) : super(children: children);
} }
/// {@template flapper_entrance} /// {@template flapper_entrance}

@ -36,10 +36,10 @@ void main() {
'beginContact plays the flapper animation', 'beginContact plays the flapper animation',
(game) async { (game) async {
final behavior = FlapperSpinningBehavior(); final behavior = FlapperSpinningBehavior();
final entrance = FlapperEntrance(); final entrance = FlapperEntrance();
final flap = FlapSpriteAnimationComponent(); final flap = FlapSpriteAnimationComponent();
final flapper = Flapper.test(children: [entrance, flap]); final flapper = Flapper.test();
await flapper.addAll([entrance, flap]);
await entrance.add(behavior); await entrance.add(behavior);
await game.ensureAdd(flapper); await game.ensureAdd(flapper);

Loading…
Cancel
Save