onDetach method

  1. @override
void onDetach()

Called after the game has left the widget tree. This can be overridden to add logic that requires the game not be on the flutter widget tree anymore.

Implementation

@override
void onDetach() {
  _notifyGameDetach();
  super.onDetach();
}