I\'m a looking for a way to load async data on InitState method, I need some data before build method runs. I\'m using a GoogleAuth code, and I need to execute build method
@override void initState() { super.initState(); _userStorage.getCurrentUser().then((user) { setState(() { if (user.isAuthenticated) { Timer.run(() { redirectTo(); }); } }); }); } void redirectTo() { Navigator.push(context, MaterialPageRoute(builder: (BuildContext context) => new ShopOrders())); }