taskFromResult method

Task? taskFromResult(
  1. Map<String, dynamic> result
)

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;