decode static method

SlotLayer decode(
  1. String properties
)

Implementation

static SlotLayer decode(String properties) {
  var map = json.decode(properties);
  if (map["layout"] == null) {
    map["layout"] = {};
  }
  if (map["paint"] == null) {
    map["paint"] = {};
  }
  return SlotLayer(
    id: map["id"],
    minZoom: map["minzoom"]?.toDouble(),
    maxZoom: map["maxzoom"]?.toDouble(),
    slot: map["slot"],
    filter: styleOptionalCastList(map["filter"]),
  );
}