retry method
- String clientId
Re-sends a failed message with the same client id (re-uploading its file first if the upload never finished).
Implementation
Future<void> retry(String clientId) async {
final p = _state.pending.where((p) => p.clientId == clientId).firstOrNull;
if (p == null) return;
final fresh = p.copyWith(failed: false, clearError: true);
_replacePending(fresh);
await _uploadThenSend(fresh);
}