toMap method

Map<String, dynamic> toMap()

Implementation

Map<String, dynamic> toMap() => {
  "grid": grid == null ? null : {"x": grid!.x, "y": grid!.y},
  "segment": segment == null ? null : {"x": segment!.x, "y": segment!.y},
  "index": index == null ? null : index,
};