clusterFromPlatformCluster static method
Cluster
clusterFromPlatformCluster(
- PlatformCluster cluster
Converts a Pigeon PlatformCluster to the corresponding Cluster.
Implementation
static Cluster clusterFromPlatformCluster(PlatformCluster cluster) {
return Cluster(
ClusterManagerId(cluster.clusterManagerId),
cluster.markerIds
// See comment in messages.dart for why the force unwrap is okay.
.map((String? markerId) => MarkerId(markerId!))
.toList(),
position: _latLngFromPlatformLatLng(cluster.position),
bounds: _latLngBoundsFromPlatformLatLngBounds(cluster.bounds),
);
}