update method

  1. @override
void update(
  1. double t
)
override

This implementation of update updates every component in the list.

It also actually adds the components that were added by the addLater method, and remove those that are marked for destruction via the Component.destroy method. You can override it further to add more custom behaviour.

Implementation

@override
void update(double t) {
  components.addAll(_addLater);
  _addLater.clear();

  components.forEach((c) => c.update(t));
  components.removeWhere((c) => c.destroy());
}