I have a const List. It means every item to the list is constant . I can say that notificationActions[0] is also a constant.
const notificationActions = [
'Category updated',
'Sticker pack updated' ,
'new feature Added'
];
Problem : Switch statement in dart says Case expressions must be constant, It means dart doest consider notificationActions[0] as a constant but why? here is my expression
setTypeNotification(String type){
switch(type)
{
case notificationActions[0]:
// Some statements
break;
}
}