withResult static method
WorkerResponse with a valid result
. If result
is an Iterable
but not a List
, it will be converted
to a List
by calling toList()
.
Implementation
static WorkerResponse withResult(dynamic result) => [
null, // 0 - travel time
result, // 1 - result
null, // 2 - error
null, // 3 - end of stream
null, // 4 - log message
];