fetchNitroStickerPacks method

Future<List<StickerPack>> fetchNitroStickerPacks()

Implementation

Future<List<StickerPack>> fetchNitroStickerPacks() async {
  final route = HttpRoute()..stickerPacks();
  final request = BasicRequest(route);

  final response = (await client.httpHandler.executeSafe(request)).jsonBody as Map<String, Object?>;
  final packs = parseMany(response['sticker_packs'] as List, parseStickerPack);

  packs.forEach(client.updateCacheWith);
  return packs;
}