From 4e54cfc3a5536eb545672e80de57b7fefb85330b Mon Sep 17 00:00:00 2001 From: Allison Ryan Date: Mon, 2 May 2022 13:04:19 -0500 Subject: [PATCH] refactor: use firstChild --- .../behaviors/android_spaceship_bonus_behavior.dart | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/game/components/android_acres/behaviors/android_spaceship_bonus_behavior.dart b/lib/game/components/android_acres/behaviors/android_spaceship_bonus_behavior.dart index 87f19b2d..743c8fa6 100644 --- a/lib/game/components/android_acres/behaviors/android_spaceship_bonus_behavior.dart +++ b/lib/game/components/android_acres/behaviors/android_spaceship_bonus_behavior.dart @@ -9,9 +9,7 @@ class AndroidSpaceshipBonusBehavior extends Component @override void onMount() { super.onMount(); - - final androidSpaceship = - parent.children.whereType().single; + final androidSpaceship = parent.firstChild()!; // TODO(alestiago): Refactor subscription management once the following is // merged: