getThemeMenus method

Future<Iterable<ThemeMenu>> getThemeMenus(
  1. int id
)

Gets the theme menus of the given theme

Implementation

Future<Iterable<ThemeMenu>> getThemeMenus(int id) async {
  final response = await _get('/api/theme/$id/menu');

  return response.data.keys.map<ThemeMenu>((name) => ThemeMenu(name: name, menu: Menu.fromJson(response.data[name])));
}