SuperPainter constructor

SuperPainter(
  1. WhiteboardDraw draw
)

Implementation

SuperPainter(this.draw) {
  if (draw != null)
    size = draw.getSize();
  else
    size = new Size(0, 0);

  if (draw != null && draw.lines != null) {
    var lastWipeIndex = draw.lines.lastIndexWhere((l) => l.wipe);
    visibleLines =
        lastWipeIndex > -1 ? draw.lines.sublist(lastWipeIndex) : draw.lines;
  } else
    visibleLines = new List<Line>();
}