title: Default values of an optional parameter must be constant
body: <p>I've been trying to get this right for some time and can't figure out what is wrong.</p>
  <pre><code>enum MyEnum { a, b }
  
  class ClassA {
    final MyEnum myEnum;
    ClassA({this.myEnum = MyEnum.a});
  }
  
  class ClassB {
    final ClassA classA;
    ClassB({this.classA = ClassA()}); // ClassA expression is underlined with red
  }
  </code></pre>
  <p>The IDE (Visual Studio Code) complains with:</p>
  <pre><code>[dart] Default values of an optional parameter must be constant.
  </code></pre>
  <p>I've tried to prefix it with <code>const</code>, <code>new</code>, and passing values to the <code>ClassA</code> constructor, but nothing works. Can anyone see what I am doing wrong here?</p>