title: Flutter Google Maps Polyline - The argument type 'LatLng' can't be assigned to the parameter type 'List<LatLng>'
body: <p>I am using Google Maps within my Flutter project. I am trying to parse two JSON files in my assets so that I can use their latitudes and longitudes in a Polyline and markers. The markers work fine but now I am adding another future to my <code>Future</code> builder for the polylines and I receive the following error: </p>
  
  <blockquote>
    <p>The argument type <code>LatLng</code> can't be assigned to the parameter type <code>List&lt;LatLng&gt;</code>.</p>
  </blockquote>
  
  <pre class="lang-dart prettyprint-override"><code>Future _future;
  
  Future _futuree;
  
  Future&lt;String&gt; loadString() async =&gt; await rootBundle.loadString('assets/busStops/stops_${widget.selectStation}.json');
  List&lt;Marker&gt; allMarkers = [];
  GoogleMapController _controller;
  
  @override
  void initState() {
    // TODO: implement initState
    super.initState();
  
    //future 1
    _future = loadString();
  
    //future 2
    _futuree = loadMyCoord();
  
  }
  
  Future&lt;String&gt; loadMyCoord() async {
    var x = await rootBundle
        .loadString('assets/route/coords_Centurion.json');
    return x;
  }
  
  @override
  Widget build(BuildContext context) {
    createMarker(context);
    return Scaffold(
      appBar: AppBar(
        title: Text("Bus Routes"),
        centerTitle: true,
        backgroundColor: Color.fromRGBO(59, 62, 64, 1),
        actions: &lt;Widget&gt;[
          FlatButton(
            textColor: Colors.white,
            onPressed: () {
              Navigator.push(
                context,
                MaterialPageRoute(builder: (context) =&gt; busStationList()),
              );
            },
            child: Icon(Icons.add),
          ),
        ],
      ),
      body: Stack(children: [
        Container(
          height: MediaQuery.of(context).size.height,
          width: MediaQuery.of(context).size.width,
          child: FutureBuilder(
  
            // Futures
            future: Future.wait(
              [
                //[0]
                _future,
  
                //[1]
                _futuree,
              ]
            ),
  
            builder: (
                    context, 
                    AsyncSnapshot&lt;List&lt;dynamic&gt;&gt; snapshot,
            ) {
              // Check hasData once for all futures.
              if (!snapshot.hasData) {
                return CircularProgressIndicator();
              }
  
              List&lt;dynamic&gt; parsedJson = jsonDecode(snapshot.data[0]);
              allMarkers = parsedJson.map((element) {
                return Marker(
                    icon: customIcon,
                    markerId: MarkerId(element["Latitude"].toString()),
                    position: LatLng(element['Latitude'] ?? 0.0,
                        element['Longitude'] ?? 0.0));
              }).toList();
  
              List&lt;dynamic&gt; parseJson = jsonDecode(snapshot.data[1]);
              List&lt;Polyline&gt; allPolylinesByPosition = [];
              parseJson.forEach((element){
                List&lt;dynamic&gt; coords = element["coords"];
  
                coords.forEach((i) {
                  double lat = double.tryParse(i["latitude"]);
                  double lng = double.tryParse(i["longitude"]);
  
                  allPolylinesByPosition.add(Polyline(
                    polylineId: PolylineId('lines'),
                    points: points: LatLng(lat ?? 0.0, lng ?? 0.0);
                    visible: true,
                    color: Colors.red
  
                  ));
                }
  
                );
              });
  
              return GoogleMap(
                initialCameraPosition: CameraPosition(
                    target: LatLng(-26.1711459, 27.9002758), zoom: 9.0),
                markers: Set.from(allMarkers),
                onMapCreated: mapCreated,
                polylines: Set.from(allPolylinesByPosition),
              );
            },
          ),
        ),
      ]),
    );
  }
  
  void mapCreated(controller) {
    setState(() {
      _controller = controller;
    });
  }
  </code></pre>