title: I am getting error: Undefined class 'required'. when trying to use required keyword
body: <p>I am getting error: Undefined class 'required'. when trying to use required keyword.</p>
  <p>Here is the code sample:</p>
  <pre><code>class Field {
    final int id;
    final String name;
    final bool userEditable;
    final String title;
    Field({
      required this.id,
      this.name,
      this.userEditable,
      this.title,
    });
  }
  </code></pre>
  <p><a href="https://i.stack.imgur.com/bhDwd.png" rel="noreferrer"><img src="https://i.stack.imgur.com/bhDwd.png" alt="enter image description here" /></a></p>
  <p>I am already using flutter's <code>@required</code> keyword but I trying to switch to dart's new <code>required</code> keyword.</p>
  <p>Here is <code>pubspec.yaml</code>'s enviroment sdk line:</p>
  <pre><code>environment:
    sdk: &quot;&gt;=2.7.0 &lt;3.0.0&quot;
  </code></pre>
  <p>Here is output of flutter --version:</p>
  <pre><code>Flutter 2.0.1 • channel stable • https://github.com/flutter/flutter.git
  Framework • revision c5a4b4029c (2 weeks ago) • 2021-03-04 09:47:48 -0800
  Engine • revision 40441def69
  Tools • Dart 2.12.0
  </code></pre>