Widget build(BuildContext context) {

  return new FutureBuilder<User>(
      future: userInfo,
      builder: (BuildContext context, AsyncSnapshot<User> snapshot) 
      switch(snapshot.connectionState) {
        case ConnectionState.none:
          return Container();
        case ConnectionState.waiting:
          return new Center(
            child: new CircularProgressIndicator());
          return new Text('');
        case ConnectionState.done:
          if(snapshot.hasError) {
            error = snapshot.error;
            return Container();
          } else {
            return Container();
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter