title: Enhanced Enums cause Flutter app to hang when used in widget
body: <p>I am trying to upgrade my code to use the new enhanced enum feature of dart 2.17 and flutter 3.0.5.</p>
  <p>Here is my enum:</p>
  <pre><code>enum Permission {
    first(1, &quot;first&quot;),
    second(2, &quot;second&quot;);
  
    const Permission(this.id, this.name);
  
    final int id;
    final String name;
  }
  </code></pre>
  <p>Usage, called in build() of a stateful widget:</p>
  <pre><code>String name = Permission.first.name;
  </code></pre>
  <p>When I run my program everything compiles and I get no error messages, but the program hangs on a white screen and constantly reloads, never making it to the home screen. If I comment out the line where I access the name of the permission, everything loads and runs properly. Not sure why accessing the enum property causes the program to break. Any reason this is happening?</p>