Tutorial by Examples

enum Fruit { apple, banana } main() { var a = Fruit.apple; switch (a) { case Fruit.apple: print('it is an apple'); break; } // get all the values of the enums for (List<Fruit> value in Fruit.values) { print(value); } // get the second val...

Page 1 of 1