getThemeCategories method

Future<Iterable<ThemeBlogCategory>> getThemeCategories(
  1. int id
)

Gets the theme category of the given theme

Implementation

Future<Iterable<ThemeBlogCategory>> getThemeCategories(int id) async {
  final response = await _get('/api/theme/$id/category');

  return response.data.keys.map<ThemeBlogCategory>(
      (name) => ThemeBlogCategory(name: name, blogCategory: BlogCategory.fromJson(response.data[name])));
}