getCustomList function Null safety

Future<SingleCustomListResponse> getCustomList(
  1. String listId
)

Gets the data of the customList identified by it's listId or list uuid and returns a SingleCustomListResponsecontaining the data.

Implementation

Future<SingleCustomListResponse> getCustomList(String listId) async {
  var response = await getCustomListResponse(listId);
  try {
    return SingleCustomListResponse.fromJson(jsonDecode(response.body));
  } on Exception {
    throw MangadexServerException(jsonDecode(response.body));
  }
}