popState method
Pop out the last State object from the Set.
Implementation
bool popState() {
// Don't continue if not initiated.
if (!_init) {
return true;
}
// Don't continue if null.
if (_state == null) {
return true;
}
// Remove the 'current' state
final removed = _stateSet.remove(_state);
// Reassign the last state object.
if (_stateSet.isEmpty) {
_state = null;
} else {
_state = _stateSet.last;
}
return removed;
}