Transition

EZ Flutter provides a customizable loading screen to switch between to screens after some work is done.

Basics

Use the EzTransition to switch from Screen A to B after some work is done. The "work" is defined by the toProcess argument.

Usage

Transition from Screen A to B

Create a method that does the work and use the Navigator to switch to the EzTransition Screen. Add a "loading" widget and the method as an argument.

void toProcess() async {
  await new Future.delayed(const Duration(seconds: 3));
  Navigator.push(
    context,
    MaterialPageRoute(
      builder: (context) => MyNewScreen(),
    ));
}

FlatButton(
  child: Text("Start transition"),
  onPressed: () {
    Navigator.push(
      context,
      MaterialPageRoute(
        builder: (context) => EzTransition(EzPulse(), toProcess,backgroundColor: Colors.white)),
    );
  },
)

Build in loading widgets

EZ Flutter offers some loading animations that can be used for the EzTransition.