What is the difference between Sink and Stream in Flutter?

后端 未结 4 640
栀梦
栀梦 2021-02-03 23:50

The Google I/O 2018 video about Flutter explains how to use Dart streams to manage state in a Flutter application. The speaker talked about using Sink as input stre

4条回答
  •  臣服心动
    2021-02-04 00:16

    If you are looking for a very basic definitions on stream and sinks, then refer to this:

    Stream - the conveyor belt is called as a stream

    StreamController - this is what controls the stream

    StreamTransformer - this is what processes the input data

    StreamBuilder - it’s a method that takes stream as an input and provides us with a builder which rebuilds every time there is a new value of a stream

    sink - the property which takes an input

    stream - the property which gives the output out of the Stream

    For more details, please refer to this article

提交回复
热议问题