flutter_phoenix 0.0.1 copy "flutter_phoenix: ^0.0.1" to clipboard
flutter_phoenix: ^0.0.1 copied to clipboard

outdated

Easily restart your application from scratch

Flutter Phoenix #

Easily restart your application from scratch.

Usage #

Wrap you App widget in the Phoenix widget.

void main() {
  runApp(
    Phoenix(
      child: App(),
    ),
  );
}

Call the rebirth static method when you want to restart your application (rebuild the entire widget tree from scratch).

Phoenix.rebirth(context);

Disclaimer :

Phoenix restarts your application at the application level, rebuilding your application widget tree from scratch, losing any previous state.

Phoenix does not fully restart your application process at the OS level.

Use cases #

Here is a non-exhaustive list of use cases where Phoenix 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
  • ...

Installation #

Dependency #

Add the package as a dependency in your pubspec.yaml file.

dependencies:
  flutter_phoenix: "^0.0.1"

Import #

Import the package in your code file.

import 'package:flutter_phoenix/flutter_phoenix.dart';

License #

Flutter Phoenix is released under the MIT License

About us #

We are a french mobile design and development team.

Website : https://www.mobiten.com

455
likes
0
pub points
98%
popularity

Publisher

verified publisherdailyn.app

Easily restart your application from scratch

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on flutter_phoenix