clusterFromPlatformCluster static method

Cluster clusterFromPlatformCluster(
  1. PlatformCluster cluster
)

Converts a Pigeon PlatformCluster to the corresponding Cluster.

Implementation

static Cluster clusterFromPlatformCluster(PlatformCluster cluster) {
  return Cluster(
    ClusterManagerId(cluster.clusterManagerId),
    cluster.markerIds.map((String markerId) => MarkerId(markerId)).toList(),
    position: _latLngFromPlatformLatLng(cluster.position),
    bounds: _latLngBoundsFromPlatformLatLngBounds(cluster.bounds),
  );
}