restart_app 1.1.3 copy "restart_app: ^1.1.3" to clipboard
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.

Buy Me A Book

326
likes
0
pub points
98%
popularity

Publisher

verified publishergabrimatic.info

A simple package that helps you to restart the whole Flutter app with a single function call.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter, flutter_web_plugins, plugin_platform_interface

More

Packages that depend on restart_app