onLoad method
Called once, when the object is added: where it gets its assets and adds its children. Until it, and everything added during it, are loaded, the object is hidden: not drawn, not hit, not started or updated. Then it appears whole, and loaded completes.
Return a future (Future<void> onLoad() async) to load something;
an object that loads nothing appears at once, in the same add.
A load that throws destroys the object and goes to World.errors;
the parent's load goes on without it. If the object is destroyed
while it loads, its load finds it gone at its next step (adding to
it and loading for it throw a StateError) and is ignored, and
what it loaded is freed.
Implementation
@mustCallSuper
@protected
FutureOr<void> onLoad() {}