resize method

  1. @override
  2. @mustCallSuper
void resize(
  1. Size size
@mustCallSuper, override

This implementation of resize passes the resize call along to every component in the list, enabling each one to make their decisions as how to handle the resize.

It also updates the size field of the class to be used by later added components and other methods. You can override it further to add more custom behaviour, but you should seriously consider calling the super implementation as well.


void resize(Size size) {
  this.size = size;
  components.forEach((c) => c.resize(size));