Cluster<T extends ClusterItem>.fromItems constructor

Cluster<T extends ClusterItem>.fromItems(
  1. Iterable<T> items
)

Implementation

Cluster.fromItems(this.items)
    : location = LatLng(
        items.fold<double>(0, (p, c) => p + c.location.latitude) / items.length,
        items.fold<double>(0, (p, c) => p + c.location.longitude) / items.length,
      );