Call Restart.restartApp() to use the default behavior for the platform. Set mode only when you need a different restart method. An unsupported mode returns a failed RestartResult. Use Restart.restartCapability() to check support at runtime.

Android

The default restart relaunches the app’s main activity and starts Flutter again. It can keep the existing Android process. Android TV and Fire TV are supported through their TV launcher entry. Use RestartMode.process to also end the existing process. forceKill: true selects the same behavior. A restart requires an attached activity and an app entry that Android can launch.

iOS

The default restart creates a new Flutter engine, runs Dart again, registers plugins, and replaces the Flutter view controller. The old engine is then destroyed. RestartMode.flutterEngine selects this behavior explicitly. Complete the iOS setup and request the restart while the app is active. The iOS process stays alive, so native globals and singletons are not reset. iOS has no public API for an automatic full process restart. The optional RestartMode.notificationFallback schedules a local notification and closes the app. Reopening it requires notification permission and a notification tap.

Web

A restart reloads the whole Flutter web app. By default, the URL is unchanged, including its path, query, and hash. An app opened at /settings restarts with that URL; your router determines which screen appears. Pass webOrigin to choose a different URL or hash route. Despite the parameter name, it accepts destinations such as /my-app/ and #/home, as well as full URLs. It also reloads the app when the destination differs only by its hash. See web destinations for URL resolution and browser history. The web implementation supports both JavaScript and WebAssembly builds. With path routing, your server must serve the Flutter app at the destination URL.

macOS

A restart opens a new instance through NSWorkspace, then asks the existing instance to quit. Both supported modes resolve to process. A launch failure returns RESTART_FAILED. The app’s termination delegate can cancel or postpone quitting, leaving the old instance open. Check this behavior in your signed app, including any sandbox or unsaved-document handling.

Linux

A restart runs the app executable again through execv, replacing the running program while keeping the same process ID. Both supported modes resolve to process. The executable must remain accessible. If your app uses command-line arguments, follow the Linux setup to keep them after a restart. If a deferred execv call fails, the existing app stays open and the failure is written to the native log.

Windows

A restart opens a new app process through CreateProcess and ends the existing process. Both supported modes resolve to process, and the original command line is preserved. This uses standard desktop process launching. MSIX and Store apps can require package activation instead, so verify the distribution format you use. A launch restriction returns RESTART_FAILED before the existing process is ended.