Install

Add the package:
Then fetch dependencies:

Requirements

Dart SDK: >=3.4.0 · Flutter: >=3.22.0 The Android module builds on Android Gradle Plugin 8 and 9. It applies the Kotlin Gradle Plugin only when nothing else has already provided Kotlin, so it builds on both AGP majors with the Flutter template default android.builtInKotlin=false. Turning built-in Kotlin on is a separate Flutter migration that needs Flutter 3.47 or later; on earlier Flutter releases it fails for every plugin, including Flutter’s own plugin template.

Restart the app

Import the package and call Restart.restartApp():
For production flows, keep the returned result and handle failures:
Restart.restartApp() returns a RestartResult with success, the resolved mode, and platform error details when the restart cannot be started.

Customize behavior

Default behavior works for normal app restart flows. Pass options only when your app needs a specific platform behavior.

Check capabilities

Use Restart.restartCapability() when your UI should adapt to the current platform.