pointsViewerElement static method

ViewerElement<List<Point<num>>> pointsViewerElement(
  1. List<Point<num>> points, [
  2. Color? color
])

Converts a List<Point<num>> to ViewerElement< List<Point<num>> >.

color Optional color to render the element.

Implementation

static ViewerElement<List<Point<num>>> pointsViewerElement(
    List<Point<num>> points,
    [Color? color]) {
  return ViewerElement<List<Point<num>>>(points, color,
      valueCopier: (value) =>
          value?.map((p) => Point<num>(p.x, p.y)).toList());
}