Unverified Commit b61fcfd2 authored by Todd Volkert's avatar Todd Volkert Committed by GitHub

AsyncSnapshot.data to throw if error or no data (#34626)

This updates `AsyncSnapshot.data` to act as `AsyncSnapshot.requireData`
used to -- and it removes `AsyncSnapshot.requireData`. Correspondingly,
this adds a `StreamBuilder.withoutInitialData()` constructor, makes the
`initialData` argument to the default `StreamBuilder()` constructor required,
and deprecates the `initialData` argument to the `FutureBuilder()` constructor.

See the  breaking change announcement for more info.

https://github.com/flutter/flutter/issues/34545
https://groups.google.com/forum/#!topic/flutter-announce/H6Od0QdsdrI
parent 1aa4628f
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment