beamBack method

bool beamBack({
  1. Map<String, dynamic>? data,
})

Beams to previous state in beamStateHistory. and removes the last state from history.

If there is no previous state, does nothing.

Returns the success, whether the state updated.

Implementation

bool beamBack({Map<String, dynamic>? data}) {
  if (!canBeamBack) {
    return false;
  }
  removeLastBeamState();
  // has to exist because canbeamBack
  final state = removeLastBeamState()!;
  update(
    state: createState!(state.copyWith(data: data)),
    transitionDelegate: beamBackTransitionDelegate,
  );
  return true;
}