onGameResize method

  1. @override
  2. @mustCallSuper
void onGameResize(
  1. Vector2 gameSize
)
override

Called whenever the size of the top-level Canvas changes.

In addition, this method will be invoked before each onMount.

Implementation

@override
@mustCallSuper
void onGameResize(Vector2 gameSize) {
  super.onGameResize(gameSize);
  if (isMounted) {
    _updateMargins();
  }
}