requestJSONObject<T> method
Future<T>
requestJSONObject<T>(
- BaseAPIInput input, {
- required T mapper(
- JsonObject jsonObject
- 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());
}