list static method

List<Facet> list(
  1. List facetsMap
)

Implementation

static List<Facet> list(List facetsMap) {
  List<Facet> facets = [];
  for (Map map in facetsMap) {
    String? type = map["\$type"];
    Facet facet =
        Facet(type, ByteSlice(map["index"]), featureList(map["features"]));
    facets.add(facet);
  }
  return facets;
}