Future<dynamic> waitForEvent(String name) { return _eventController[name]?.stream.first ?? (throw Exception("wrong event name")); }