refactor: use firstChild

pull/298/head
Allison Ryan 3 years ago
parent 71bb26054a
commit 4e54cfc3a5

@ -9,9 +9,7 @@ class AndroidSpaceshipBonusBehavior extends Component
@override @override
void onMount() { void onMount() {
super.onMount(); super.onMount();
final androidSpaceship = parent.firstChild<AndroidSpaceship>()!;
final androidSpaceship =
parent.children.whereType<AndroidSpaceship>().single;
// TODO(alestiago): Refactor subscription management once the following is // TODO(alestiago): Refactor subscription management once the following is
// merged: // merged:

Loading…
Cancel
Save