Polygon.read constructor

Polygon.read(
  1. int? srid,
  2. ByteDataReader reader,
  3. bool hasZ,
  4. bool hasM,
)

Implementation

factory Polygon.read(int? srid, ByteDataReader reader, bool hasZ, bool hasM) {
  final length = reader.readUint32();
  return Polygon(
    srid,
    List.generate(
      length,
      (i) => LineString.read(srid, reader, hasZ, hasM),
    ),
    hasZ,
    hasM,
  );
}