Skip to content

Instantly share code, notes, and snippets.

@berkayoruc
Created December 4, 2021 19:22
Show Gist options
  • Save berkayoruc/35ee780edd87d9ba412c6255b0b2f6b8 to your computer and use it in GitHub Desktop.
Save berkayoruc/35ee780edd87d9ba412c6255b0b2f6b8 to your computer and use it in GitHub Desktop.
MarkerClusterLayerOptions buildMarkerClusterLayerOptions(
AsyncSnapshot<List<Buffet>> snapshot) {
return MarkerClusterLayerOptions(
showPolygon: false,
maxClusterRadius: 50,
size: const Size(40, 40),
fitBoundsOptions: const FitBoundsOptions(
padding: EdgeInsets.all(50),
),
markers: getMarkers(snapshot.data),
popupOptions: buildPopupOptions(),
builder: (context, markers) => buildClusterMarker(markers));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment