Easily restart your application from scratch.
Wrap you App widget in the Iterum
widget.
void main() {
runApp(
Iterum(
child: App(),
),
);
}
Call the revive
static method when you want to restart your application (rebuild the entire widget from scratch).
Iterum.revive(context);
Disclaimer :
Iterum restarts your application at the application level, rebuilding your application widget tree from scratch, losing any previous state.
Iterum does not fully restart your application process at the OS level.
Here is a non-exhaustive list of use cases where Iterum
can help :
- restart the app after a logout
- restart the app after a failed app initialization process
- restart the app after a specific event in the app occurs
- ...
Add the package as a dependency in your pubspec.yaml file.
dependencies:
flutter_Iterum: "^1.0.0"
Import the package in your code file.
import 'package:flutter_Iterum/flutter_Iterum.dart';
Flutter Iterum is released under the MIT License