how to set enum value to string in flutter code example
Example: dart enum from string
Fruit f = Fruit.values.firstWhere((e) => e.toString() == 'Fruit.' + str);
Fruit f = Fruit.values.firstWhere((e) => e.toString() == 'Fruit.' + str);