title: How to add marker in the google map using flutter?
body: <p>I am creating a nearby flutter app which shows restaurant around your location. i have found the nearby location but unable to add markers on the nearby coordinates.I want to know how to add markers to my location using google API and how to load the location from the list to my map.</p>
  
  <pre><code>void getData() async {
      http.Response response = await http.get(
          'https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=-33.8670522,151.1957362&amp;radius=1500&amp;type=restaurant&amp;key=API_KEY');
  
      if (response.statusCode == 200) {
        String data = response.body;
        var decodedData = jsonDecode(data);
        print(decodedData);
        List&lt;String&gt; names = [];
        List&lt;double&gt; lat = [];
        List&lt;double&gt; lng = [];
        for (var i = 0; i &lt; 10; i++) {
          names.add(decodedData['results'][i]['name']);
          lat.add(decodedData['results'][i]['geometry']['location']['lat']);
          lng.add(decodedData['results'][i]['geometry']['location']['lng']);
        }
        print(names);
        print(lat);
        print(lng);
      }
    }
  
  
  
  Expanded(
                child: Container(
                  height: MediaQuery.of(context).size.height,
                  width: MediaQuery.of(context).size.width,
                  child: GoogleMap(
                    initialCameraPosition: CameraPosition(
                      target: LatLng(-33.8670522, 151.1957362),
                      zoom: 14.4746,
                    ),
                    markers: Set&lt;Marker&gt;.of(markers.values),
                    onMapCreated: (GoogleMapController controller) {
                      _controller.complete(controller);
                    },
                  ),
                ),
              ),
  </code></pre>