title: Parsing double values from JSON in Flutter and Dart
body: <p>I have problems while I try to get double values from JSON in Flutter.</p>
  
  <pre><code>class MapPoint {
    String title;
    double lat;
    double lng;
  
    MapPoint({this.title, this.lat, this.lng});
  
    factory MapPoint.fromJson(Map&lt;String, dynamic&gt; json) {
      return MapPoint(
          title: json["title"] as String,
          lat: json["lat"] as double,
          lng: json["lng"] as double
      );
    }
  }
  </code></pre>
  
  <p>For some reason I got error </p>
  
  <blockquote>
    <p>Dart Error: Unhandled exception: type 'double' is not a subtype of
    type 'String'</p>
  </blockquote>
  
  <p>I tried some to user <code>double.parse(json["lng"])</code> instead but got same error.<br>
  Same time this way of getting data from JSON works fine with other types.</p>
  
  <p>This is JSON example</p>
  
  <pre><code>{ 
     point: {
       title: "Point title",
       lat: 42.123456,
       lng: 32.26567
    }
  }
  </code></pre>