labelsViewerElement static method
Converts a List<Rectangle<num>> to ViewerElement< List<Rectangle<num>> >.
color Optional color to render the element.
strokeSize Optional stroke size to render the element.
Implementation
static ViewerElement<List<Label<num>>> labelsViewerElement(
    List<Label<num>> labels,
    [Color? color,
    int? strokeSize]) {
  return ViewerElement<List<Label<num>>>(labels, color,
      strokeSize: strokeSize,
      valueCopier: (value) => value
          ?.map((l) =>
              Label<num>(l.label, l.left, l.top, l.width, l.height, l.color))
          .toList());
}