title: How to parse JSON array in Flutter with length of one?
body: <p>This is my code for an array of JSON with length one that returns result with length 0:</p>
  
  <pre><code>class profilInfo {
    final List&lt;information&gt; result;
    profilInfo._({ this.result});
    factory profilInfo.fromJson(Map jsonMap) {
      return new profilInfo._(
          result : (jsonMap['result'] as List).map((i) =&gt;
              information.fromJson(i)).toList()
      );
    }
  }
  
  class information{
    final String firstname;
    final String country;
    final String city;
    final String about;
    final String profilephoto;
    information._({
      this.firstname,this.country,this.about,this.city,this.profilephoto});
      factory information.fromJson(Map jsonMap) {
      return new information._(
        firstname : jsonMap['first_name'],
        country : jsonMap['country'],
        city : (jsonMap['city']),
        about : (jsonMap['about']),
        profilephoto : (jsonMap['profile_photo']),
      );
    }
  }
  </code></pre>
  
  <p>I have a JSON file:</p>
  
  <pre><code>{
    "status": 200,
    "result": [
      {
        "username": "mohammad",
        "password": "202cb962ac59075b964b07152d234b70",
        "create_date": "2019-08-13T08:53:24.997Z",
        "modify_date": "2019-08-13T08:53:24.997Z",
        "last_pay_date": null,
        "first_name": "mohammad reza shabani",
        "last_name": " ",
        "country": "usa",
        "city": "alai",
        "phone": "09120564589",
        "users_id": [],
        "profile_photo": "",
        "about": "",
        "_id": "5d527a84abe6713aacc62453",
        "__v": 0
      }
    ]
  }
  </code></pre>
  
  <p>I get this error:</p>
  
  <blockquote>
    <p>[ERROR:flutter/lib/ui/ui_dart_state.cc(148)] Unhandled Exception: RangeError (index): Invalid value: Valid value range is empty: 0</p>
  </blockquote>