deserialize method Null safety

  1. @override
Polygon deserialize(
  1. ByteDataReader reader
)
override

Implementation

@override
Polygon deserialize(ByteDataReader reader) {
  //deserializes a message object of type Polygon
  final data = Polygon();
  // Deserialize message field [points]
  {
    // Deserialize array length for message field [points]
    final len = reader.readInt32();
    data.points = List.generate(len, (_) => Point32.$prototype.deserialize(reader));
  }
  return data;
}