I'm working with dart and let's say I have an enumeration (potentially really long) that I cannot modify:
enum Animal {
cat,
dog,
lion,
tigger,
}
Is it possible to restrict this enum, I would like to obtain
enum DomesticAnimal {
cat,
dog,
}
with DomesticAnimal.cat
still being an Animal
?
Also, is it possible to extend it to obtain
enum LivingCreature {
cat,
dog,
lion,
tigger,
tree,
flower,
}
where LivingCreature.cat
still being an Animal
?