requestJSONObject<T> method

Future<T> requestJSONObject<T>(
  1. BaseAPIInput input, {
  2. required T mapper(
    1. JsonObject jsonObject
    ),
  3. NetworkRequestOptions options = const NetworkRequestOptions(),
})

Implementation

Future<T> requestJSONObject<T>(
  BaseAPIInput input, {
  required T Function(JsonObject jsonObject) mapper,
  NetworkRequestOptions options = const NetworkRequestOptions(),
}) async {
  final apiResponse = await _requestJSONData<T>(input, options: options);
  return mapper(apiResponse.data as JsonObject? ?? const JsonObject.empty());
}