await Restart.restartApp(
mode: RestartMode.platformDefault,
webOrigin: '#/home',
forceKill: false,
notificationTitle: 'Restart',
notificationBody: 'Tap to reopen the app.',
);
| Parameter | Platform | Description |
|---|---|---|
mode | All | Requested restart behavior: platformDefault, flutterEngine, process, or notificationFallback. |
webOrigin | Web | Custom URL for the reload. When null, the current page reloads and keeps its route. Supports hash strategy, for example #/home. |
notificationTitle | iOS | Title of the local notification shown only when mode is notificationFallback. Defaults to Restart. |
notificationBody | iOS | Body of the local notification shown only when mode is notificationFallback. Defaults to Tap to reopen the app. |
forceKill | Android | When true, fully terminates the process after launching the new activity. Defaults to false. RestartMode.process enables this path automatically on Android. |