StreamBuilder's snapshot is not giving all data emitted by Stream in FlutterFlutter : Can I add a Header Row to a ListViewFlutter : Bad state: Stream has already been listened toEmit the data to parent Widget in FlutterFlutter Streams, how to access previously emitted data from the streamHow to return list of object in a stream on flutterflutter snackbar display based on streamhow to use Firebase snapshot with rxdart streamsStream (BLoC) doesn't emit values while used in TabBarViewFlutter - rxdart - Reading stream multiple timesHow to cache rxdart streams in flutter for infinite scroll

Can't connect to Internet in bash using Mac OS

Why is there a need to modify system call tables in linux?

Infinitely many hats

Why do Russians call their women expensive ("дорогая")?

What does it mean when you think without speaking?

Understanding STM32 datasheet regarding decoupling capacitors

Biblical Basis for 400 years of silence between old and new testament

Get LaTeX form from step by step solution

Do creatures all have the same statistics upon being reanimated via the Animate Dead spell?

Beginner's snake game using PyGame

Points within polygons in different projections

How can a single Member of the House block a Congressional bill?

Self-Preservation: How to DM NPCs that Love Living?

What does "Marchentalender" on the front of a postcard mean?

etoolbox: AtBeginEnvironment is not At Begin Environment

Could IPv6 make NAT / port numbers redundant?

Is there an evolutionary advantage to having two heads?

Why does the UK have more political parties than the US?

How crucial is a waifu game storyline?

Why would Lupin kill Pettigrew?

60s (or earlier) short story where each colony has one person who doesn't connect well with others who is there for being able to absorb knowledge

If a problem only occurs randomly once in every N times on average, how many tests do I have to perform to be certain that it's now fixed?

How to make the POV character sit on the sidelines without the reader getting bored

Is floating in space similar to falling under gravity?



StreamBuilder's snapshot is not giving all data emitted by Stream in Flutter


Flutter : Can I add a Header Row to a ListViewFlutter : Bad state: Stream has already been listened toEmit the data to parent Widget in FlutterFlutter Streams, how to access previously emitted data from the streamHow to return list of object in a stream on flutterflutter snackbar display based on streamhow to use Firebase snapshot with rxdart streamsStream (BLoC) doesn't emit values while used in TabBarViewFlutter - rxdart - Reading stream multiple timesHow to cache rxdart streams in flutter for infinite scroll






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








2















I am trying the below code to print 1, 2 and 3 on a Text widget. But the problem is its only printing 1 and 3. But by property concat should print all data sequentially right?



Stream<String> get concatStream => Observable.concat(
[new Observable.just(1.toString()),
new Observable.timer(2.toString(), new Duration(seconds: 1)),
new Observable.just(3.toString())]);


The weird part is, if I use the below configuration. It's printing all the 3 values sequentially. What can be the problem?



Stream<String> get concatStream => Observable.concat([
new Observable.just(1.toString()),
new Observable.timer(2.toString(), new Duration(seconds: 2)),
new Observable.timer(3.toString(),new Duration(seconds: 1))
]);


Code of my StreamBuilder:



return StreamBuilder(
stream: getStream(),
builder: (BuildContext context, AsyncSnapshot<String> snapshot)
if (snapshot.hasData)
print(snapshot.data);
return Text(
snapshot.data,
textAlign: TextAlign.center,
style: TextStyle(fontWeight: FontWeight.w300),
);
else if (snapshot.hasError)
return Text("Error");
else
return CircularProgressIndicator();

);









share|improve this question






















  • read StreamBuilder documentation: " The builder is called at the discretion of the Flutter pipeline, and will thus receive a timing-dependent sub-sequence of the snapshots that represent the interaction with the stream. As an example, when interacting with a stream producing the integers 0 through 9, the builder may be called with any ordered sub-sequence of the following snapshots that includes the last one (the one with ConnectionState.done):"

    – pskink
    Mar 24 at 9:48












  • Yeah now I got it. But don't you think its not a good approach to miss out some data. I was just scratching my head from past 2 hours over this funny behaviour. Btw thanks for that comment. But any idea how to resolve this if I want all the 3 values? @pskink

    – XoXo
    Mar 24 at 9:54






  • 1





    simply Listen() that Stream

    – pskink
    Mar 24 at 9:56












  • maybe there is another way in async package? or use Stream#transform which simply returns the same element?

    – pskink
    Mar 24 at 10:11












  • Actually the Listen() method as mentioned by you didn't work. I was checking with the 2nd configuration which was already working.

    – XoXo
    Mar 24 at 10:25

















2















I am trying the below code to print 1, 2 and 3 on a Text widget. But the problem is its only printing 1 and 3. But by property concat should print all data sequentially right?



Stream<String> get concatStream => Observable.concat(
[new Observable.just(1.toString()),
new Observable.timer(2.toString(), new Duration(seconds: 1)),
new Observable.just(3.toString())]);


The weird part is, if I use the below configuration. It's printing all the 3 values sequentially. What can be the problem?



Stream<String> get concatStream => Observable.concat([
new Observable.just(1.toString()),
new Observable.timer(2.toString(), new Duration(seconds: 2)),
new Observable.timer(3.toString(),new Duration(seconds: 1))
]);


Code of my StreamBuilder:



return StreamBuilder(
stream: getStream(),
builder: (BuildContext context, AsyncSnapshot<String> snapshot)
if (snapshot.hasData)
print(snapshot.data);
return Text(
snapshot.data,
textAlign: TextAlign.center,
style: TextStyle(fontWeight: FontWeight.w300),
);
else if (snapshot.hasError)
return Text("Error");
else
return CircularProgressIndicator();

);









share|improve this question






















  • read StreamBuilder documentation: " The builder is called at the discretion of the Flutter pipeline, and will thus receive a timing-dependent sub-sequence of the snapshots that represent the interaction with the stream. As an example, when interacting with a stream producing the integers 0 through 9, the builder may be called with any ordered sub-sequence of the following snapshots that includes the last one (the one with ConnectionState.done):"

    – pskink
    Mar 24 at 9:48












  • Yeah now I got it. But don't you think its not a good approach to miss out some data. I was just scratching my head from past 2 hours over this funny behaviour. Btw thanks for that comment. But any idea how to resolve this if I want all the 3 values? @pskink

    – XoXo
    Mar 24 at 9:54






  • 1





    simply Listen() that Stream

    – pskink
    Mar 24 at 9:56












  • maybe there is another way in async package? or use Stream#transform which simply returns the same element?

    – pskink
    Mar 24 at 10:11












  • Actually the Listen() method as mentioned by you didn't work. I was checking with the 2nd configuration which was already working.

    – XoXo
    Mar 24 at 10:25













2












2








2








I am trying the below code to print 1, 2 and 3 on a Text widget. But the problem is its only printing 1 and 3. But by property concat should print all data sequentially right?



Stream<String> get concatStream => Observable.concat(
[new Observable.just(1.toString()),
new Observable.timer(2.toString(), new Duration(seconds: 1)),
new Observable.just(3.toString())]);


The weird part is, if I use the below configuration. It's printing all the 3 values sequentially. What can be the problem?



Stream<String> get concatStream => Observable.concat([
new Observable.just(1.toString()),
new Observable.timer(2.toString(), new Duration(seconds: 2)),
new Observable.timer(3.toString(),new Duration(seconds: 1))
]);


Code of my StreamBuilder:



return StreamBuilder(
stream: getStream(),
builder: (BuildContext context, AsyncSnapshot<String> snapshot)
if (snapshot.hasData)
print(snapshot.data);
return Text(
snapshot.data,
textAlign: TextAlign.center,
style: TextStyle(fontWeight: FontWeight.w300),
);
else if (snapshot.hasError)
return Text("Error");
else
return CircularProgressIndicator();

);









share|improve this question














I am trying the below code to print 1, 2 and 3 on a Text widget. But the problem is its only printing 1 and 3. But by property concat should print all data sequentially right?



Stream<String> get concatStream => Observable.concat(
[new Observable.just(1.toString()),
new Observable.timer(2.toString(), new Duration(seconds: 1)),
new Observable.just(3.toString())]);


The weird part is, if I use the below configuration. It's printing all the 3 values sequentially. What can be the problem?



Stream<String> get concatStream => Observable.concat([
new Observable.just(1.toString()),
new Observable.timer(2.toString(), new Duration(seconds: 2)),
new Observable.timer(3.toString(),new Duration(seconds: 1))
]);


Code of my StreamBuilder:



return StreamBuilder(
stream: getStream(),
builder: (BuildContext context, AsyncSnapshot<String> snapshot)
if (snapshot.hasData)
print(snapshot.data);
return Text(
snapshot.data,
textAlign: TextAlign.center,
style: TextStyle(fontWeight: FontWeight.w300),
);
else if (snapshot.hasError)
return Text("Error");
else
return CircularProgressIndicator();

);






dart flutter rxdart






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 24 at 9:41









XoXoXoXo

49611142




49611142












  • read StreamBuilder documentation: " The builder is called at the discretion of the Flutter pipeline, and will thus receive a timing-dependent sub-sequence of the snapshots that represent the interaction with the stream. As an example, when interacting with a stream producing the integers 0 through 9, the builder may be called with any ordered sub-sequence of the following snapshots that includes the last one (the one with ConnectionState.done):"

    – pskink
    Mar 24 at 9:48












  • Yeah now I got it. But don't you think its not a good approach to miss out some data. I was just scratching my head from past 2 hours over this funny behaviour. Btw thanks for that comment. But any idea how to resolve this if I want all the 3 values? @pskink

    – XoXo
    Mar 24 at 9:54






  • 1





    simply Listen() that Stream

    – pskink
    Mar 24 at 9:56












  • maybe there is another way in async package? or use Stream#transform which simply returns the same element?

    – pskink
    Mar 24 at 10:11












  • Actually the Listen() method as mentioned by you didn't work. I was checking with the 2nd configuration which was already working.

    – XoXo
    Mar 24 at 10:25

















  • read StreamBuilder documentation: " The builder is called at the discretion of the Flutter pipeline, and will thus receive a timing-dependent sub-sequence of the snapshots that represent the interaction with the stream. As an example, when interacting with a stream producing the integers 0 through 9, the builder may be called with any ordered sub-sequence of the following snapshots that includes the last one (the one with ConnectionState.done):"

    – pskink
    Mar 24 at 9:48












  • Yeah now I got it. But don't you think its not a good approach to miss out some data. I was just scratching my head from past 2 hours over this funny behaviour. Btw thanks for that comment. But any idea how to resolve this if I want all the 3 values? @pskink

    – XoXo
    Mar 24 at 9:54






  • 1





    simply Listen() that Stream

    – pskink
    Mar 24 at 9:56












  • maybe there is another way in async package? or use Stream#transform which simply returns the same element?

    – pskink
    Mar 24 at 10:11












  • Actually the Listen() method as mentioned by you didn't work. I was checking with the 2nd configuration which was already working.

    – XoXo
    Mar 24 at 10:25
















read StreamBuilder documentation: " The builder is called at the discretion of the Flutter pipeline, and will thus receive a timing-dependent sub-sequence of the snapshots that represent the interaction with the stream. As an example, when interacting with a stream producing the integers 0 through 9, the builder may be called with any ordered sub-sequence of the following snapshots that includes the last one (the one with ConnectionState.done):"

– pskink
Mar 24 at 9:48






read StreamBuilder documentation: " The builder is called at the discretion of the Flutter pipeline, and will thus receive a timing-dependent sub-sequence of the snapshots that represent the interaction with the stream. As an example, when interacting with a stream producing the integers 0 through 9, the builder may be called with any ordered sub-sequence of the following snapshots that includes the last one (the one with ConnectionState.done):"

– pskink
Mar 24 at 9:48














Yeah now I got it. But don't you think its not a good approach to miss out some data. I was just scratching my head from past 2 hours over this funny behaviour. Btw thanks for that comment. But any idea how to resolve this if I want all the 3 values? @pskink

– XoXo
Mar 24 at 9:54





Yeah now I got it. But don't you think its not a good approach to miss out some data. I was just scratching my head from past 2 hours over this funny behaviour. Btw thanks for that comment. But any idea how to resolve this if I want all the 3 values? @pskink

– XoXo
Mar 24 at 9:54




1




1





simply Listen() that Stream

– pskink
Mar 24 at 9:56






simply Listen() that Stream

– pskink
Mar 24 at 9:56














maybe there is another way in async package? or use Stream#transform which simply returns the same element?

– pskink
Mar 24 at 10:11






maybe there is another way in async package? or use Stream#transform which simply returns the same element?

– pskink
Mar 24 at 10:11














Actually the Listen() method as mentioned by you didn't work. I was checking with the 2nd configuration which was already working.

– XoXo
Mar 24 at 10:25





Actually the Listen() method as mentioned by you didn't work. I was checking with the 2nd configuration which was already working.

– XoXo
Mar 24 at 10:25












0






active

oldest

votes












Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55322453%2fstreambuilders-snapshot-is-not-giving-all-data-emitted-by-stream-in-flutter%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55322453%2fstreambuilders-snapshot-is-not-giving-all-data-emitted-by-stream-in-flutter%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현