Skip to content

General (deep?) questions about code behavior #3

@RinaldoNani

Description

@RinaldoNani

HI,

thanks for your great work, I do appreciate your tutorials.

Although this code is quite "old", there are a few aspects that remain unclear to me.
I dropped a question at stack-overflow:
https://stackoverflow.com/questions/61306821/flutters-puzzling-stream-behaviour-setstate-called-but-not-rebuilding-widget-t?noredirect=1#comment108455669_61306821
hoping that someone can shine light :)

Here is the core of my questions:
And here come my questions:

  1. why does Flutter rebuilds the widgets just twice, even though setState is called every time an item is added to the list objects?

  2. if the whole list is filled in one-shot before repainting, what is the point in using a stream?

  3. if the http call returns ALL THE DATA at once (as it does), then what's the point in using a stream to fill a (long) list of items, and not fill the list directly - after the async/await event has been triggered?

I will be for ever grateful to whoever will help me with these issues! Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions