render method

  1. @override
void render(
  1. Canvas canvas

This implementation of render basically calls renderComponent for every component, making sure the canvas is reset for each one.

You can override it further to add more custom behaviour. Beware of however you are rendering components if not using this; you must be careful to save and restore the canvas to avoid components messing up with each other.


void render(Canvas canvas) {;
  components.forEach((comp) => renderComponent(canvas, comp));