decodeListOf<T> function
Decodes a JSON list, naming the failing index. Used by generated code.
Implementation
List<T> decodeListOf<T>(Object? v, String f, T Function(Object? e, String p) each) {
if (v is! List) throw BridgeError(BridgeErrorCode.params, '$f: expected a list');
return [for (var i = 0; i < v.length; i++) each(v[i], '$f[$i]')];
}