render method

  1. @override
  2. @mustCallSuper
void render(
  1. Canvas canvas
)
inherited

This implementation of render renders each component, making sure the canvas is reset for each one.

You can override it further to add more custom behavior. Beware of that if you are rendering components without using this method; you must be careful to save and restore the canvas to avoid components interfering with each others rendering.

Implementation

@override
@mustCallSuper
void render(Canvas canvas) {
  if (parent == null) {
    renderTree(canvas);
  }
}