"Classes as enums" tip is obsolete
orevial opened this issue · comments
Using classes as enum has become obsolete since Dart 2.17, this tip could be removed !
also, it could be cleaner done through extension, i.e.
enum AnimalType{ dog, cat, parrot };
extension on AnimalType {
static const _foodTypes =['meat', 'fish', 'fruit'];
String get foodType => _foodTypes[index];
}
which could still be useful, if it's some local ui property, specific to current widget.