Skip to content

Instantly share code, notes, and snippets.

@kenzieschmoll
Created March 15, 2019 20:00
Show Gist options
  • Save kenzieschmoll/a0be2eda97362724ea5b79c49e6f4f27 to your computer and use it in GitHub Desktop.
Save kenzieschmoll/a0be2eda97362724ea5b79c49e6f4f27 to your computer and use it in GitHub Desktop.
Maps Sample V2 - add onAddmarkerButtonPressed() pt 3 - implement method
void _onAddMarkerButtonPressed() {
setState(() {
_markers.add(Marker(
// This marker id can be anything that uniquely identifies each marker.
markerId: MarkerId(_lastMapPosition.toString()),
position: _lastMapPosition,
infoWindow: InfoWindow(
title: 'Really cool place',
snippet: '5 Star Rating',
),
icon: BitmapDescriptor.defaultMarker,
));
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment