removeAllAndPush method
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);
}