replaceLastWith method

NavigationStack<T> replaceLastWith(
  1. AppPageNode<T> page
)

Implementation

NavigationStack<T> replaceLastWith(AppPageNode<T> page) {
  final res = [...pageNodesStack]
    ..removeLast()
    ..add(page);
  return NavigationStack(res);
}