Reactive nprogramming Flashcards

(5 cards)

1
Q

What are streams and how are they controlled in flutter?

A

It is like a pipe with 2 ends only alowing to insert something to the stream and the data flows to the other end.

The pipe is called a Stream
To control the Stream, we usually use a StreamController
To insert something into the Stream, the StreamController exposes the “entrance”, called a StreamSink, accessible via the sink property
The way out of the Stream, is exposed by the StreamController via the stream property

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What can be conveyed by a Stream?

A

Everything and anything. From a value, an event, an object, a collection, a map, an error or even another Stream, any type of data may be conveyed by a Stream.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is a single-subscripton stream?

A

This type of Stream only allows a single listener during the whole lifetime of that Stream.
It is not possible to listen twice on such Stream, even after the first subscription has been canceled.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is a broadcast stream?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is a broadcast stream?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly