invokeSyncAllClients method

Stream<TdlibInvokeResult> invokeSyncAllClients({
  1. required Map parameters,
  2. bool isVoid = false,
  3. Duration? delayDuration,
  4. Duration? invokeTimeOut,
  5. String? extra,
})

invokeSync request all client

Implementation

Stream<TdlibInvokeResult> invokeSyncAllClients({
  required Map parameters,
  bool isVoid = false,
  Duration? delayDuration,
  Duration? invokeTimeOut,
  String? extra,
}) async* {
  for (int clientId in getAllClientIds()) {
    try {
      var result = invokeSync(
        parameters: parameters,
      );
      yield TdlibInvokeResult(
        client_id: clientId,
        result: result,
      );
    } catch (e) {
      if (e is Map) {
        yield TdlibInvokeResult(
          client_id: clientId,
          result: e,
        );
      }
    }
  }
}