initial method Null safety

  1. @override
AsyncSnapshot<T> initial()

Returns the initial summary of stream interaction, typically representing the fact that no interaction has happened at all.

Sub-classes must override this method to provide the initial value for the fold computation.


AsyncSnapshot<T> initial() => initialData == null
    ? AsyncSnapshot<T>.nothing()
    : AsyncSnapshot<T>.withData(ConnectionState.none, initialData as T);