notifyProgress method
Report progress on an in-flight server-initiated request (spec
notifications/progress). progressToken is the token the server
sent in the original request's _meta.progressToken.
Implementation
void notifyProgress(
dynamic progressToken,
double progress, {
double? total,
String? message,
}) {
if (!_initialized) {
throw McpError('Client is not initialized');
}
_sendNotification('notifications/progress', {
'progressToken': progressToken,
'progress': progress,
if (total != null) 'total': total,
if (message != null) 'message': message,
});
}