title: Error while creating immutable model using built_value in flutter
body: <p>I am getting the following error :</p>
  
  <blockquote>
    <p>Exception has occurred. Deserializing '[{id: 22, date_created:
    2018-06-05T06:58:43, date_created_gmt: 2018-06-05T06:...' to
    'Customer' failed due to: type '_InternalLinkedHashMap' is not a subtype of type 'String' in type cast</p>
  </blockquote>
  
  <p>How to create the <code>built_value</code> model for the following JSON response.</p>
  
  <pre><code>[
      {
          "id": 22,
          "date_created": "2018-06-05T06:58:43",
          "date_created_gmt": "2018-06-05T06:58:43",
          "date_modified": "2018-06-22T13:18:45",
          "date_modified_gmt": "2018-06-22T13:18:45",
          "email": "prasangaahal42@gmail.com",
          "first_name": "Prasanga",
          "last_name": "Dahal",
          "role": "customer",
          "username": "_prasanga",
          "billing": {
              "first_name": "Prasanga",
              "last_name": "Dahal",
              "company": "",
              "address_1": "Binayak Marg, Biratnagar 56613, Nepal",
              "address_2": "",
              "city": "Biratnagar",
              "state": "KOS",
              "postcode": "",
              "country": "NP",
              "email": "prasangadahal42@gmail.com",
              "phone": "9862316136"
          },
          "shipping": {
              "first_name": "Prsanga",
              "last_name": "Dahal",
              "company": "",
              "address_1": "Binyak Marg, Biratnagar 5613, Nepal",
              "address_2": "",
              "city": "Biratnagar",
              "state": "KOS",
              "postcode": "",
              "country": "NP"
          },
          "is_paying_customer": true,
          "orders_count": 2,
          "total_spent": "920.00",
          "avatar_url": "https://secure.gravatar.com/avatar/1a733bfdb72af0ee8f64b15435dd84a5?s=96&amp;d=retro&amp;r=g",
          "meta_data": [
              {
                  "id": 475,
                  "key": "wc_last_active",
                  "value": "1534982400"
              },
              {
                  "id": 2888,
                  "key": "shipping_method",
                  "value": [
                      "flat_rate:2"
                  ]
              }
          ],
          "_links": {
              "self": [
                  {
                      "href": "https://mamham.com/wp-json/wc/v2/customers/22"
                  }
              ],
              "collection": [
                  {
                      "href": "https://mamham.com/wp-json/wc/v2/customers"
                  }
              ]
          }
      }
  ]
  </code></pre>
  
  <p>I have wrote following dart code for the <code>Customer</code> model.</p>
  
  <pre><code>import 'package:built_collection/built_collection.dart';
  
  import 'package:built_value/built_value.dart';
  
  import 'package:built_value/serializer.dart';
  
  part 'Customer.g.dart';
  
  abstract class Customer implements Built &lt;Customer, CustomerBuilder&gt; {
  
    int get id;
    DateTime get date_created;
    DateTime get date_created_gmt;
    DateTime get date_modified;
    DateTime get date_modified_gmt;
    String get email;
    String get first_name;
    String get last_name;
    String get role;
    String get username;
  
    Billing get billing;
  
    Shipping get shipping;
  
    Customer._();
  
    static Serializer&lt;Customer&gt; get serializer =&gt; _$customerSerializer;
  
    factory Customer([updates(CustomerBuilder b)]) = _$Customer;
  
  }
  
  abstract class Billing implements Built &lt;Billing, BillingBuilder&gt; {
  
    String get first_name;
    String get last_name;
    String get company;
    String get address_1;
    String get address_2;
    String get city;
    String get state;
    String get postcode;
    String get country;
    String get email;
    String get phone;
  
    Billing._();
  
    static Serializer&lt;Billing&gt; get serializer =&gt; _$billingSerializer;
  
    factory Billing([updates(BillingBuilder b)]) = _$Billing;
  
  }
  
  abstract class Shipping implements Built &lt;Shipping, ShippingBuilder&gt; {
  
    String get first_name;
    String get last_name;
    String get company;
    String get address_1;
    String get address_2;
    String get city;
    String get state;
    String get postcode;
    String get country;
    String get email;
    String get phone;
  
    Shipping._();
  
    static Serializer&lt;Shipping&gt; get serializer =&gt; _$shippingSerializer;
  
    factory Shipping([updates(ShippingBuilder b)]) = _$Shipping;
  }
  </code></pre>