fetchNextCategory static method

Future<List<NetmeraCategory>> fetchNextCategory()

Implementation

static Future<List<NetmeraCategory>> fetchNextCategory() async {
  return await _platform.invokeMethod(_FETCH_NEXT_CATEGORY).then((receivedJson) {
    List<NetmeraCategory> categoryList = List.empty(growable: true);
    receivedJson.forEach((item) {
      categoryList.add(NetmeraCategory.fromJson(item));
    });
    return categoryList;
  });
}