onAttach method

  1. @override
void onAttach()

Called when the game has been attached. This can be overridden to add logic that requires the game to already be attached to the widget tree.

Implementation

@override
void onAttach() {
  super.onAttach();
  build();
}