You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a function like this that plays a sound and I want it to return only once the sound stops so I am trying to use a Completer.
Future<bool> playAttackSound(AttackType type)
{
Sound s;
Completer comp =newCompleter();
switch (type) {
//init s based on type
...
}
s.onStop.addOnce((Sound foo) => comp.complete(true));
s.play();
return comp.future;
}
}
But...when I run my game once the sound plays I get these errors.
Closure call with mismatched arguments: function 'call'
NoSuchMethodError: incorrect number of arguments passed to method named 'call'
Receiver: Closure: (Sound) => dynamic
Tried calling: call(Instance of 'Sound', "")
Found: call(foo)
What's going on here?
The text was updated successfully, but these errors were encountered:
I wouldn't really be able to commit much time to such things at least for another few weeks but I wouldn't mind trying to help sometime. I'd kind of like to wait and see if @playif comes back around sometime soon though. If any of us could figure out what's going on with some bugs (like this one) we could always make pull requests on this repo.
I have a function like this that plays a sound and I want it to return only once the sound stops so I am trying to use a
Completer
.But...when I run my game once the sound plays I get these errors.
What's going on here?
The text was updated successfully, but these errors were encountered: