The StreamBuilder

The StreamBuilder works just like a FutureBuilder, but it updates its content in real time to match the content of a given stream, instead of simply displaying the result of a given future like the FutureBuilder does:

 StreamBuilder(
  stream: myStream(),
  builder: (context, snapshot) {
 if​(!snapshot.hasData) ​return​ CircularProgressIndicator();
 return​ MyWidget(
  data: snapshot.data
  );
  }
 )
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset