dispose method

  1. @override
  2. @mustCallSuper
void dispose()
override

Disposes of this container and all of its children.

This method should be called when this container is no longer needed, to release any resources it holds.

After calling this method, this container and all of its children will be unusable.

Implementation

@override
@mustCallSuper
void dispose() {
  for (final child in children) {
    child.dispose();
  }
  children.clear();
  super.dispose();
}