pop method
Pop the top-most Layer off of the stack and activate the one below it
(if there is one), passing the optional result
value.
Implementation
void pop([Object? result]) {
if (_layers.isEmpty) return;
var layer = _layers.removeLast();
layer._unbindUi();
// activate the new top layer if there is one
if (_layers.isNotEmpty) _layers.last.onActive(layer, result);
dirty();
}