popLevel method

Level? popLevel({
  1. double? ambianceFadeTime,
})

Pop the most recent level.

Implementation

Level? popLevel({
  final double? ambianceFadeTime,
}) {
  if (_levels.isNotEmpty) {
    final oldLevel = _levels.removeLast()..onPop(ambianceFadeTime);
    final cl = currentLevel;
    if (cl != null) {
      cl.onReveal(oldLevel);
    }
    return oldLevel;
  }
  return null;
}