title: flutter build runner not working - The getter 'uri' was called on null
body: <p>I was using flutter with build runner perfectly , but today it just getting this null error .
  Even thought I reverted my code changes but still the same error .</p>
  <p>the error :</p>
  <pre><code>&gt;[SEVERE] json_serializable:json_serializable on test/widget_test.dart:
  
  &gt;NoSuchMethodError: The getter 'uri' was called on null.
  &gt;Receiver: null
  &gt;Tried calling: uri
  &gt;[INFO] 3.3s elapsed, 1/17 actions completed.
  &gt;[INFO] 4.4s elapsed, 1/17 actions completed.
  &gt;[INFO] 5.4s elapsed, 1/17 actions completed.
  &gt;[INFO] 6.4s elapsed, 1/17 actions completed.
  &gt;[INFO] 7.5s elapsed, 1/17 actions completed.
  &gt;[INFO] 8.5s elapsed, 1/17 actions completed.
  &gt;[INFO] 9.6s elapsed, 1/17 actions completed.
  &gt;[INFO] 10.7s elapsed, 1/17 actions completed.
  &gt;[INFO] 11.8s elapsed, 1/17 actions completed.
  &gt;[INFO] 12.9s elapsed, 1/17 actions completed.
  &gt;[INFO] 14.0s elapsed, 1/17 actions completed.
  &gt;[INFO] 15.0s elapsed, 1/17 actions completed.
  &gt;[INFO] 16.1s elapsed, 1/17 actions completed.
  &gt;[INFO] 17.1s elapsed, 1/17 actions completed.
  &gt;[WARNING] No actions completed for 15.1s, waiting on:
  &gt;  json_serializable:json_serializable on lib/common_widgets/alert_screens.dart
  &gt;  json_serializable:json_serializable on lib/common_widgets/app_logo.dart
  &gt;  json_serializable:json_serializable on lib/common_widgets/app_tab_bar.dart
  &gt;  json_serializable:json_serializable on lib/common_widgets/buttons_widgets.dart
  &gt;  json_serializable:json_serializable on lib/common_widgets/cards.dart
  &gt;  .. and 11 more
  &gt;  [INFO] 18.2s elapsed, 1/17 actions completed.
  &gt;  [INFO] 19.3s elapsed, 1/17 actions completed.
  </code></pre>
  <p>and it keeps going on like that .</p>
  <p>I am using :</p>
  <pre><code>    sdk: &quot;&gt;=2.7.0 &lt;3.0.0&quot;
      flutter: ^1.22.0
      build_runner: ^1.10.0
      json_serializable: ^3.5.0
      analyzer: ^0.41.1
  </code></pre>
  <p>the model I am trying to generate :</p>
  <pre><code>
      import 'package:flutter/foundation.dart';
      import 'package:json_annotation/json_annotation.dart';
      
      part 'clinic.g.dart';
      
      @JsonSerializable()
      class Clinic {
        final int establishmentYear;
        final String workingHours;
        final String phoneNumber;
        final String location;
      
        Clinic({
          @required this.establishmentYear,
          @required this.workingHours,
          @required this.phoneNumber,
          @required this.location,
        });
      
        factory Clinic.fromJson(Map&lt;String, dynamic&gt; json) =&gt; _$ClinicFromJson(json);
        Map&lt;String, dynamic&gt; toJson() =&gt; _$ClinicToJson(this);
      }
  
  </code></pre>