smart_restart 0.1.0 copy "smart_restart: ^0.1.0" to clipboard
smart_restart: ^0.1.0 copied to clipboard

PlatformAndroid

Simple, no-setup app restart for Flutter. Clean relaunch on Android.

smart_restart #

Clean, no-setup app restart for Flutter (Android).


⚡️ Features #

  • Android: Relaunches your app by clearing the task and starting a new launch intent, then finishing the current task. This is particularly useful after a hotfix or patch has been downloaded.
  • iOS: Not implemented yet. This is currently a no-op on iOS.

📦 Install #

Add the following to your pubspec.yaml file:

dependencies:
  smart_restart: ^0.1.0

🚀 Usage #

Just call SmartRestart.restart() whenever you need to restart your app.

import 'package:smart_restart/smart_restart.dart';
// ...

ElevatedButton(
  onPressed: () async => SmartRestart.restart(),
  child: const Text('Restart App'),
);
6
likes
160
points
11
downloads

Publisher

unverified uploader

Weekly Downloads

Simple, no-setup app restart for Flutter. Clean relaunch on Android.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on smart_restart

Packages that implement smart_restart