restart method

void restart(
  1. String? webOrigin
)

Restarts the web app.

The webOrigin parameter is optional. If it's null, the method uses the window.origin to get the site origin. This parameter should only be filled when your current origin is different than the app's origin. It defaults to null.

This method replaces the current location with the given webOrigin (or window.origin if webOrigin is null), effectively reloading the web app.

Implementation

void restart(String? webOrigin) {
  web.window.location.replace(
    webOrigin ?? web.window.origin.toString(),
  );
}