fetchList<D> method
Sends request and decodes the response as a list — the one-liner
every feature-specific "fetch many" method should be.
Implementation
@protected
Future<List<D>> fetchList<D>(
AgRequest request,
D Function(Map<String, dynamic> json) fromJson,
) async {
final response = await send<Object?>(request, decode: (json) => json);
return decodeListPayload(response.data, fromJson);
}