String
getProductListLabel(- dynamic productList,
- dynamic context,
- {bool verbose = true}
)
Implementation
static String getProductListLabel(
final ProductList productList, final BuildContext context,
{final bool verbose = true}) {
final AppLocalizations appLocalizations = AppLocalizations.of(context);
switch (productList.listType) {
case ProductListType.HTTP_SEARCH_KEYWORDS:
return '${productList.parameters}'
'${verbose ? ' ${appLocalizations.category_search}' : ''}';
case ProductListType.HTTP_SEARCH_CATEGORY:
return '${productList.parameters}'
'${verbose ? ' ${appLocalizations.category_search}' : ''}';
case ProductListType.SCAN_SESSION:
return appLocalizations.scan;
case ProductListType.HISTORY:
return appLocalizations.recently_seen_products;
case ProductListType.USER:
return productList.parameters;
}
}