title: Dart built_Value, BuiltList error in serializer - Arguments of a constant creation must be constant expression
body: <p>I have the following json object</p>
  <pre><code>{
      &quot;notifications&quot;: [
          {
              &quot;correspondenceId&quot;: &quot;81&quot;,
              &quot;type&quot;: &quot;notification&quot;,
              &quot;title&quot;: &quot;Find Your Future at Indiana University&quot;,
              &quot;snippet&quot;: &quot;&quot;,
              &quot;readFlag&quot;: &quot;NO&quot;,
              &quot;date&quot;: &quot;Delivered on: Jul 09, 2018 at 12:00 AM&quot;,
              &quot;readDate&quot;: &quot;Read on: Apr 03, 2018 at 12:00 AM&quot;,
              &quot;icon&quot;: &quot;message&quot;,
              &quot;color&quot;: &quot;neutral&quot;
          },
          {
              &quot;correspondenceId&quot;: &quot;80&quot;,
              &quot;type&quot;: &quot;notification&quot;,
              &quot;title&quot;: &quot;My IU Experience&quot;,
              &quot;snippet&quot;: &quot;&quot;,
              &quot;readFlag&quot;: &quot;NO&quot;,
              &quot;date&quot;: &quot;Delivered on: Jul 09, 2018 at 12:00 AM&quot;,
              &quot;readDate&quot;: &quot;Read on: Apr 03, 2018 at 12:00 AM&quot;,
              &quot;icon&quot;: &quot;message&quot;,
              &quot;color&quot;: &quot;red&quot;
          },
          {
              &quot;correspondenceId&quot;: &quot;82&quot;,
              &quot;type&quot;: &quot;notification&quot;,
              &quot;title&quot;: &quot;Test RSVP&quot;,
              &quot;snippet&quot;: &quot;&quot;,
              &quot;readFlag&quot;: &quot;NO&quot;,
              &quot;date&quot;: &quot;Delivered on: Jul 09, 2018 at 12:00 AM&quot;,
              &quot;readDate&quot;: &quot;Read on: Apr 10, 2018 at 04:31 PM&quot;,
              &quot;icon&quot;: &quot;message&quot;,
              &quot;color&quot;: &quot;neutral&quot;
          }
      ]
  }
  </code></pre>
  <p>I have created the following object model using built_value</p>
  <pre><code>import 'package:built_collection/built_collection.dart';
  import 'package:built_value/built_value.dart';
  import 'package:built_value/serializer.dart';
  
  part 'notification.g.dart';
  
  abstract class NotificationList
      implements Built&lt;NotificationList, NotificationListBuilder&gt; {
    BuiltList&lt;NotificationElement&gt; get notifications;
  
    NotificationList._();
    static Serializer&lt;NotificationList&gt; get serializer =&gt;
        _$notificationListSerializer;
    factory NotificationList([updates(NotificationListBuilder b)]) =
        _$NotificationList;
  }
  
  abstract class NotificationElement
      implements Built&lt;NotificationElement, NotificationElementBuilder&gt; {
    String get correspondenceId;
  
    String get type;
  
    String get title;
  
    @nullable
    String get snippet;
  
    String get readFlag;
  
    bool get derivedReadFlag {
      return readFlag.contains(&quot;YES&quot;);
    }
  
    String get date;
  
    @nullable
    String get readDate;
  
    String get icon;
  
    String get color;
  
    NotificationElement._();
    static Serializer&lt;NotificationElement&gt; get serializer =&gt;
        _$notificationElementSerializer;
    factory NotificationElement([updates(NotificationElementBuilder b)]) =
        _$NotificationElement;
  }
  </code></pre>
  <p>And the following seralizer for json deserialization:</p>
  <pre><code>import 'package:built_value/serializer.dart';
  import 'package:built_value/standard_json_plugin.dart';
  import 'package:sunapsis/datasource/dataobjects/login.dart';
  import 'package:sunapsis/datasource/dataobjects/notification.dart';
  
  part 'serializers.g.dart';
  
  @SerializersFor([
    Login,
    NotificationList,
  ])
  final Serializers serializers =
      (_$serializers.toBuilder()..addPlugin(StandardJsonPlugin())).build();
  </code></pre>
  <p>The login object model worked fine and is working as expected but when I added the NotificationList to SerializersFor, the serializer.g.dart file started throwing errors. I am getting this error message for BuiltList in the serializers.g.dart file</p>
  <blockquote>
  <p>Arguments of a constant creation must be constant expression</p>
  <p>Invalid constant value</p>
  <p>Undefined name 'BuiltList'</p>
  <p>Undefined class 'ListBuilder'</p>
  </blockquote>
  <p>On trying to compile I am getting this error which says the same thing</p>
  <pre><code>compiler message: lib/datasource/dataobjects/serializers.g.dart:24:15: Error: Getter not found: 'BuiltList'.
  compiler message:               BuiltList, const [const FullType(NotificationElement)]),
  compiler message:               ^
  compiler message: lib/datasource/dataobjects/serializers.g.dart:25:21: Error: Method not found: 'ListBuilder'.
  compiler message:           () =&gt; new ListBuilder&lt;NotificationElement&gt;()))
  compiler message:                     ^^^^^^^^^^^
  </code></pre>
  <p>Not sure where I am going wrong or what the issue could be.
  Using the following versions for built_value and built_collection</p>
  <pre><code>built_value: &quot;^5.5.3&quot;
  built_collection: &quot;^3.1.1&quot;
  build_runner: ^0.8.0
  built_value_generator: ^5.5.0
  </code></pre>
  <p>This is the serializer.g.dart file generated:</p>
  <pre><code>// GENERATED CODE - DO NOT MODIFY BY HAND
  
  part of 'serializers.dart';
  
  // **************************************************************************
  // BuiltValueGenerator
  // **************************************************************************
  
  // ignore_for_file: always_put_control_body_on_new_line
  // ignore_for_file: annotate_overrides
  // ignore_for_file: avoid_annotating_with_dynamic
  // ignore_for_file: avoid_returning_this
  // ignore_for_file: omit_local_variable_types
  // ignore_for_file: prefer_expression_function_bodies
  // ignore_for_file: sort_constructors_first
  
  Serializers _$serializers = (new Serializers().toBuilder()
        ..add(AuthProcess.serializer)
        ..add(Login.serializer)
        ..add(NotificationElement.serializer)
        ..add(NotificationList.serializer)
        ..addBuilderFactory(
            const FullType(
                BuiltList, const [const FullType(NotificationElement)]),
            () =&gt; new ListBuilder&lt;NotificationElement&gt;()))
      .build();
  </code></pre>
  <p>Any help will be greatly appreciated.</p>