restart_app
1.10.2, released 5 weeks ago by gabrimatic.info
Restart Flutter apps programmatically on Android, iOS, web, macOS, Linux, and Windows.
What it does
Provides a single API to restart Flutter applications across mobile, web, and desktop platforms. It handles platform-specific restart implementations such as relaunching activities on Android, starting a new engine on iOS, or reloading the page on the web, and returns a result indicating success or failure.
AI-written summary of version 1.10.2, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to programmatically restart the app after a configuration change, language switch, or user logout.
- You want a unified cross-platform API for app reboots on mobile, web, and desktop.
Skip it when
- You only need to rebuild the widget tree internally without restarting the entire native application process or engine.
- You require saving or clearing persistent preferences automatically during the restart process.
Strengths
- Supports all six major Flutter platforms: Android, iOS, web, macOS, Linux, and Windows.
- Provides structured error handling through a `RestartResult` object.
- Offers configurable options like custom web origins and Android restart modes.
Weaknesses
- Requires manual native setup in iOS (`AppDelegate.swift`).
- Code after the restart call may not execute if the platform successfully initiates the restart.
Setup
- Kind
- Plugin (native code)
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 1
Requires adding an import and a callback method in iOS Runner's AppDelegate.swift.
import 'package:restart_app/restart_app.dart';
await Restart.restartApp();Alternatives
Packages that do the same job and could replace restart_app.
- terminate_restart
Flutter plugin for app termination, process restart, and optional data clearing.
77Compare
Works with
Packages commonly used together with restart_app: ones it builds on, ones built on it, and its own family.