list method
Lists records from GET path.
Implementation
Future<List<T>> list({Map<String, dynamic>? query}) async {
final response = await router.get<Map<String, dynamic>>(path, query: query);
if (response.isError) throw response.error!;
return _toList(_unwrap(response.data));
}