sendAll method
Implementation
Future<void> sendAll(List<FMessage> messages) async {
if (messages.isEmpty) {
throw Exception('messages must be a non-empty array');
}
if (messages.length > _fmcMaxBatchSize) {
throw Exception(
'messages list must not contain more than $_fmcMaxBatchSize items',
);
}
await Future.wait(
messages.map(
(message) async => api.projects.messages.send(
fmc1.SendMessageRequest(
message: message.toModel(),
validateOnly: false,
),
'projects/${ArcaneAdmin.projectId}',
),
),
);
}