Skip to content
pubscout

restart

1.0.0+1, released 2 years ago by farmako.in

Restarts a Flutter app by recreating the engine at runtime.

WASM-ready
$ flutter pub add restart
Source repository

What it does

The plugin creates a new FlutterEngine instance and re‑executes the Dart entry point, effectively restarting the app without closing the native host. It works on Android and iOS via activity or view controller recreation.

AI-written summary of version 1.0.0+1, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to programmatically restart the app (e.g., after a language change or critical config update)
  • You want a quick way to reset app state without manual navigation tricks

Skip it when

  • You require a full native app restart (process kill)
  • You need a solution that works on web, desktop, or other platforms not listed

Strengths

  • Simple single‑call API
  • No native code changes required on Android
  • Handles iOS plugin re‑registration automatically

Weaknesses

  • Only supports Android and iOS
  • May not work with all plugin lifecycles
  • Potentially disruptive user experience

Setup

Kind
Plugin (native code)
Effort
Low
Code generation
No
Direct dependencies
1

Add the dependency and, for iOS, insert a few lines in AppDelegate.swift to re‑register plugins; no permissions needed.

import 'package:restart/restart.dart';

void someLogic(){
  // restart the app
  restart();
}

Works with

Packages commonly used together with restart: ones it builds on, ones built on it, and its own family.