restart_app 1.1.3
restart_app: ^1.1.3 copied to clipboard
A simple package that helps you to restart the whole Flutter app with a single function call.
Restart app in Flutter #
A simple plugin to restart your Flutter application With Native APIs.
iOS Support
Unfortunately, there is no efficient way to restart a Flutter application using native APIs in iOS. However, you can look at this StackOverflow answer, or if you have a solution, do not hesitate to add it to the open issue.
How to use it? #
1. Add the package to pubspec.yaml dependency:
dependencies:
restart_app: ^1.1.3
2. Import package:
import 'package:restart_app/restart_app.dart';
3. Call the restartApp method where ever you want:
onPressed: () {
/// Fill webOrigin only when your new origin is different than the app's origin
Restart.restartApp(webOrigin: '[your main route]');
}
Developer #
By Hossein Yousefpour 🔗 pub.dev repo
© All rights reserved.