taskFromResult method
If a tools/call (or other) result is a CreateTaskResult
(resultType: "task"), returns the Task handle; otherwise null.
Implementation
Task? taskFromResult(Map<String, dynamic> result) =>
McpResultType.of(result) == McpResultType.task
? Task.fromJson(result)
: null;