jumpBackToFirst method

Future<bool> jumpBackToFirst()

Jump back to first key and clean all

Implementation

Future<bool> jumpBackToFirst() async {
  String old = stack.isNotEmpty ? stack.last.key : null;

  if (stack.length > 1) {
    if (_interface != null) {
      if (!await _interface!.onBack()) {
        return false;
      }
    }
  }

  while (stack.length > 1) stack.removeLast();

  _onBack(old, stack.last.key);

  _fragment.sink.add(FullPosit.byPosit(
      posit: stack.last,
      bottom: _getBottom(key: stack.last.key),
      actions: _getActions(key: stack.last.key),
      floatingAction: _getFloating(key: stack.last.key)));

  return true;
}