RouterDelegate17 is a subclass of RouterDelegate. Implemented push,pop,replace methods with Navgator2.0. Different from Navgator 1.0, it can easily jump to any page in the page stack, as well as the function of page status monitoring. Support android, ios.
Demo
The animation shows the running effect of main.dart in the example file.
![](https://raw.githubusercontent.com/duhongwei/RouterDelegate17/main/img/demo.gif)
Introduction
Future<T?> push<T>(Page<T> page)
The page is pushed onto the stack. If the page to be pushed into the stack already exists, all the above pages will be popped up. That is to say, you can jump to any page in the stack.bool pop<T extends Object>
The page at the top of the stack is popped.Future<T?> replace<T, TO>(Page<T> page, {TO? result})
page replacement. If the new page already exists in the stack, all the pages at the top of the stack are popped.- Page status monitoring.
- Exit program monitoring. Whenever you want to exit the home page (such as pressing the physical exit button on the home page), it will be recorded and the number of times will be reported.
- openDialog. Wrapping showDialog, in order to allow the page below dialog to modify
PageStatus
in time, if showDialog is called directly, the page below dialog will not change the state. - openModalBottomSheet. Wrapping showModalBottomSheet, so that the page under ModalBottomSheet can modify
PageStatus
in time. If you call showModalBottomSheet directly, the page below ModalBottomSheet will not change state.
Usage
Full example, here: https://github.com/duhongwei/RouterDelegate17/tree/main/example.