requestAllClients method
invoke request all client
Implementation
Stream<TdlibInvokeResult> requestAllClients(
String method, {
Map? parameters,
bool isVoid = false,
String? extra,
bool? isUseCache,
Duration? durationCacheExpire,
}) async* {
parameters ??= {};
for (int clientId in getAllClientIds()) {
try {
var result = await request(
method,
parameters: parameters,
clientId: clientId,
isVoid: isVoid,
extra: extra,
isUseCache: isUseCache,
durationCacheExpire: durationCacheExpire,
);
yield TdlibInvokeResult(
client_id: clientId,
result: result,
);
} catch (e) {
if (e is Map) {
yield TdlibInvokeResult(
client_id: clientId,
result: e,
);
}
}
}
}