getMetaData<TData> method

Future<TData> getMetaData<TData>(
  1. String key, {
  2. Map<String, dynamic>? params,
  3. Map<String, String?>? query,
})

Implementation

Future<TData> getMetaData<TData>(String key,
    {Map<String, dynamic>? params, Map<String, String?>? query}) async {
  final response = await request<Map<String, dynamic>, Map<String, dynamic>>(
      api.baseUrl, endpointSuffix, params, ApiRequestMethod.GET,
      headers: api.getRequestHeaders(),
      query: {'\$$key': null, if (query != null) ...query});
  response.throwOnError();
  return response.data[key] as TData;
}