push method
Pushes the new route of the given url on top of the current one A path can be of one of two forms:
- stating with '/', in which case we just navigate to the given path
- not starting with '/', in which case we append the current path to the given one
We can also specify queryParameters, either by directly
putting them is the url or by providing a Map using queryParameters
We can also put a state to the next route, this state will be a router state (this is the only kind of state that we can push) accessible with VRouter.of(context).historyState
Implementation
@Deprecated('Use to (vRouter.to) instead')
void push(
String newUrl, {
Map<String, String> queryParameters = const {},
Map<String, String> historyState = const {},
}) =>
to(
newUrl,
queryParameters: queryParameters,
historyState: historyState,
);