onLoad method

  1. @mustCallSuper
  2. @protected
FutureOr<void> onLoad()

Called once, when it's put on a live object, or when its object is added: where it gets its assets. Return a future to load something. If its object is still loading, the object appears only when this is done too, and a load that throws fails the object's; on an object that has appeared, a load that throws removes only the behaviour and goes to World.errors.

Implementation

@mustCallSuper
@protected
FutureOr<void> onLoad() {}