tryParse static method
Implementation
static ArticleKind tryParse(String val) {
switch (val) {
case 'retail':
return ArticleKind.retail;
case 'basket':
return ArticleKind.basket;
case 'outOfCatalogue':
return ArticleKind.outOfCatalogue;
default:
print('$val is not a valid ArticleKind');
return ArticleKind.unknown;
}
}