perspectiveViewerElement static method

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

Converts List< Point<num> > (perspective points) to ViewerElement< List<Point<num>> >.

Implementation

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