decode<T, U> method
Converts a serialised list of items into a List<T>.
The parse method converts each item from type U into T.
The List has a fixed length if growable is false.
Implementation
List<T> decode<T, U>(
final Iterable items,
final JsonRpcParser<T, U> parse, {
final bool growable = false,
}) {
return items.map((final item) => parse(item as U)).toList(growable: growable);
}