getMenuItemsFor method
List<MenuItemModel> ?
getMenuItemsFor(
- String uniqueId,
- AppModel app,
- NewAppWizardParameters parameters,
- MenuType type,
override
Implementation
@override
List<MenuItemModel>? getMenuItemsFor(String uniqueId, AppModel app,
NewAppWizardParameters parameters, MenuType type) {
if (parameters is ShopParameters) {
return [
if (parameters.shopSpecifications.should(type))
ShopPageBuilder.menuItem(app, uniqueId),
if (parameters.cartSpecifications.should(type) && parameters.shopAsCart)
CartPageBuilder.menuItemCart(app, uniqueId),
if (parameters.cartSpecifications.should(type) &&
!parameters.shopAsCart)
CartPageBuilder.menuItemBag(app, uniqueId),
];
} else {
throw Exception('Unexpected class for parameters: $parameters');
}
}