flutter_phoenix 0.1.0

Flutter Phoenix #

Easily restart your application from scratch, losing any previous state.

Usage #

Wrap you App widget in the Phoenix widget.

void main() {
      child: App(),

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


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.

  flutter_phoenix: "^0.1.0"

Import #

Import the package in your code file.

import 'package:flutter_phoenix/flutter_phoenix.dart';

License #

Flutter Phoenix is released under the MIT License

Credit #

This package is an extract of @rrousselGit answer on this stackoverflow post

About us #

We are a french mobile design and development team.

Website : https://www.mobiten.com

Changelog #

All notable changes to this project will be documented in this file.

[0.1.0] - 2020-01-08

[0.0.1] - 2019-12-29

  • Initial release


Example #

Example application to illustrate library capabilities.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  flutter_phoenix: ^0.1.0

2. Install it

You can install packages from the command line:

with Flutter:

$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:flutter_phoenix/flutter_phoenix.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Feb 19, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.5
  • Flutter: 1.12.13+hotfix.7

Health suggestions

Format lib/generated/i18n.dart.

Run flutter format to format lib/generated/i18n.dart.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.8
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
pedantic ^1.7.0