waitForResolveWithKey method

Future waitForResolveWithKey(
  1. int key
)

Implementation

Future<dynamic> waitForResolveWithKey(int key) {
  return _eventController['resolve']
          ?.stream
          .where((event) => (int.parse(event['key']) == key))
          .map((event) => event['data'])
          .first ??
      (throw Exception("wrong event name"));
}