sendProgressNotification method

void sendProgressNotification(
  1. String sessionId,
  2. String progressToken,
  3. double progress, [
  4. double? total,
])

Send progress notification to the client

Implementation

void sendProgressNotification(String sessionId, String progressToken, double progress, [double? total]) {
  if (!isConnected) return;

  final notification = ProgressNotification(
    progressToken: progressToken,
    progress: progress,
    total: total,
  );

  _sendNotification(sessionId, 'notifications/progress', notification.toJson());
}