getMenuItemsFor method

List<MenuItemModel> getMenuItemsFor(
  1. MenuType type
)

Implementation

List<MenuItemModel> getMenuItemsFor(MenuType type) {
/*
  Evaluate evaluate;
  switch (type) {
    case MenuType.leftDrawerMenu:
      evaluate = (value) => value.availableInLeftDrawer;
      break;
    case MenuType.rightDrawerMenu:
      evaluate = (value) => value.availableInRightDrawer;
      break;
    case MenuType.appBarMenu:
      evaluate = (value) => value.availableInAppBar;
      break;
    case MenuType.bottomNavBarMenu:
      evaluate = (value) => value.availableInHomeMenu;
      break;
  }
*/

  List<MenuItemModel> newMenuItems = [];
  for (var wizard
      in NewAppWizardRegistry.registry().registeredNewAppWizardInfos) {
    var newAppWizardName = wizard.newAppWizardName;
    var newAppWizardParam = newAppWizardParameters[newAppWizardName];
    if (newAppWizardParam != null) {
      var menuItems =
          wizard.getMenuItemsFor(uniqueId, app, newAppWizardParam, type);
      if (menuItems != null) {
        newMenuItems.addAll(menuItems);
      }
    }
  }
  return newMenuItems;
}