handle method

  1. @override
Future<void> handle(
  1. String methodName,
  2. dynamic methodArguments
)
override

Implementation

@override
Future<void> handle(String methodName, dynamic methodArguments) async {
  if (_clientEventCallbacks.containsKey(methodName)) {
    if (_matchingKey == methodArguments['matchingKey'] &&
        _bucketingKey == methodArguments['bucketingKey']) {
      var clientEventCallback = _clientEventCallbacks[methodName];
      if (clientEventCallback != null && !clientEventCallback.isCompleted) {
        clientEventCallback.complete();
      }

      if (_triggeredClientEvents.containsKey(methodName)) {
        _triggeredClientEvents[methodName] = true;
      }
    }
  } else if (methodName == _eventClientUpdated &&
      _updateStreamCompleter.hasListener &&
      !_updateStreamCompleter.isPaused &&
      !_updateStreamCompleter.isClosed) {
    _updateStreamCompleter.add(null);
  }
}