openPageReplacement
Description
Removes the current Page from the navigation stack and replaces it with a new one. No previous entry is left to go back to.
Parameters
| Parameter | Type | Description |
|---|---|---|
| pagePath | String | Path or id of the Page to open |
| linkArg | dynamic | Argument passed to the target Page (any JSON-serializable value). Can be null |
| route | String? | Transition style name (for example, 'cupertino', 'material', 'zoom'). Empty or null uses the default |
Returns
void
Example
// Replace the login screen after a successful sign-in — going back never returns to it
$app.openPageReplacement("10_auth/A10login", {}, null);
Related
$app.openPage(pagePath, linkArg, route)— Push a new Page on top of the current one$app.openBackPage()— Go back to the previous Page