onPop method

  1. @override
void onPop(
  1. double? fadeLength
)
override

What should happen when this level is popped from a level stack.

Implementation

@override
void onPop(final double? fadeLength) {
  super.onPop(fadeLength);
  final sound = oldSound;
  if (sound != null && sound.keepAlive == true) {
    sound.destroy();
  }
  oldSound = null;
}