getProblemContentByTitleSlug method

Future<ProblemContent?> getProblemContentByTitleSlug({
  1. required String titleSlug,
})

Implementation

Future<ProblemContent?> getProblemContentByTitleSlug({required String titleSlug}) async {
  final data = await makeGraphQLRequest(getGraphQLPayloadProblemContent(titleSlug: titleSlug));
  final json = data['data']['question'];
  if (json == null) {
    return null;
  }
  return ProblemContent.fromJson(json);
}