@override Widget build(BuildContext context) { return new FutureBuilder<User>( future: userInfo, builder: (BuildContext context, AsyncSnapshot<User> snapshot) { switch(snapshot.connectionState) { case ConnectionState.none: _showDialog(context); return Container(); case ConnectionState.waiting: return new Center( child: new CircularProgressIndicator()); case ConnectionState.active: return new Text(''); case ConnectionState.done: if(snapshot.hasError) { error = snapshot.error; _showDialog(context); return Container(); } else { return Container(); } } });