title: Generator cannot target libraries that have not been migrated to null-safety
body: <p>This problem occurs when trying the following command:</p>
  <p><code>flutter pub run build_runner build --delete-conflicting-outputs</code></p>
  <p>The error message:</p>
  <pre><code>[SEVERE] json_serializable:json_serializable on lib/models/shipping_address/shipping_address.dart:
  
  Generator cannot target libraries that have not been migrated to null-safety.
  package:deals_and_delivery/models/shipping_address/shipping_address.dart:6:7
    ╷
  6 │ class ShippingAddress {
    │       ^^^^^^^^^^^^^^^
    ╵
  [INFO] Running build completed, took 3.6s
  
  [INFO] Caching finalized dependency graph...
  [INFO] Caching finalized dependency graph completed, took 49ms
  
  [SEVERE] Failed after 3.7s
  pub finished with exit code 1
  </code></pre>
  <p>pubspec.yaml:</p>
  <pre><code>dependencies:
    json_annotation: ^4.0.0
    flutter:
      sdk: flutter
  ...
  dev_dependencies:
    build_runner: ^1.11.5
    json_serializable: ^4.0.2
    flutter_test:
      sdk: flutter
  </code></pre>
  <p>These are the current flutter and dart versions:</p>
  <pre><code>[√] Flutter (Channel stable, 2.0.0, on Microsoft Windows [Version
  &gt; 10.0.19042.844], locale en-US)
  &gt;     • Flutter version 2.0.0 at C:\flutter
  &gt;     • Framework revision 60bd88df91 (22 hours ago), 2021-03-03 09:13:17 -0800
  &gt;     • Engine revision 40441def69
  &gt;     • Dart version 2.12.0
  </code></pre>
  <p>I am stuck at this point, how to solve this problem.</p>