params property
Request?
get
params
The request itself, which method says how to read.
The schema requires this next to elicitation/create and
sampling/createMessage. For roots/list it only requires the method.
Throws an ArgumentError when a server sent something other than an object here.
Implementation
Request? get params {
final params = _value[Keys.params];
if (params == null) return null;
if (params is! Map) {
throw ArgumentError(
'The input request params for "$method" were ${params.runtimeType}, '
'expected an object.',
);
}
return params.cast<String, Object?>() as Request;
}