'This requires the 'enhanced-enums' language feature to be enabled

I just upgraded my Flutter SDK but I am still not able to use the enhanced-enums.

$ dart --version

prints

Dart SDK version: 2.18.0-109.0.dev

This is my code:

enum Foo {
  bar(0),
  baz(1),

  final int i;
  const Foo(this.i);
}

I get the following errors:

This requires the 'enhanced-enums' language feature to be enabled.

Expected to find '}'.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source