removeAllAndPush method

void removeAllAndPush(
  1. String path, {
  2. String? id,
})

Removes all routes then pushes a new page by path.

id is used to match listeners.

Process route middlewares before remove.

Implementation

void removeAllAndPush(String path, {String? id}) {
  widget._state.removeAllAndPush(path, id: id);
}