Why enums can't be used in const constructors in Flutter?
Why enums can't be used in const constructors in Flutter? Problem Description: can someone tell me if there’s a way to use enhanced enums in const constructors? I tried both named constructors and factory constructors, with no luck: enum MyEnum { first(‘first-string’), second(‘second-string’); final String string; const MyEnum(this.string); } class MyClass { final String input; … Read more