bloc_streambuilder 0.3.2 copy "bloc_streambuilder: ^0.3.2" to clipboard
bloc_streambuilder: ^0.3.2 copied to clipboard

discontinued

A stream builder that uses the inital value of the bloc_stream.

bloc_streambuilder #

A stream builder that uses the value of a ValueObservable as initial data. This builder in combination with ValueSubject makes sure that the streambuilder does not need to build twice when the stream already has a value.

Example #


     ValueObservable<int> stream = ValueSubject(seedValue: 0);

     ValueObservableBuilder(
       builder: (context, snapshot) { // Only called once and immediately with data if the stream has data

         print(
             "Build called with data: ${snapshot.data}, connectionState: ${snapshot.connectionState}"
         ); // First time it prints "Build called with data: 0, connectionState: ConnectionState.active"

         return new Text('${snapshot.data}');
       },
       stream: stream,
     )
0
likes
30
pub points
0%
popularity

Publisher

unverified uploader

A stream builder that uses the inital value of the bloc_stream.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter, rxdart

More

Packages that depend on bloc_streambuilder