diff --git a/packages/flutter/lib/src/widgets/async.dart b/packages/flutter/lib/src/widgets/async.dart index ed8b98a697..9a4d26ed1a 100644 --- a/packages/flutter/lib/src/widgets/async.dart +++ b/packages/flutter/lib/src/widgets/async.dart @@ -201,8 +201,6 @@ enum ConnectionState { /// with a [Stream]. /// * [FutureBuilder], which builds itself based on a snapshot from interacting /// with a [Future]. -// TODO(a14n): the type parameter should be to enforce that retrieved data must not be null. -// But it breaks a lot of code in google3. See https://github.com/flutter/flutter/pull/64672#pullrequestreview-485199027 @immutable class AsyncSnapshot { /// Creates an [AsyncSnapshot] with the specified [connectionState], @@ -467,7 +465,7 @@ typedef AsyncWidgetBuilder = Widget Function(BuildContext context, AsyncSnaps /// * [StreamBuilderBase], which supports widget building based on a computation /// that spans all interactions made with the stream. // TODO(ianh): remove unreachable code above once https://github.com/dart-lang/linter/issues/1139 is fixed -class StreamBuilder extends StreamBuilderBase> { +class StreamBuilder extends StreamBuilderBase> { /// Creates a new [StreamBuilder] that builds itself based on the latest /// snapshot of interaction with the specified [stream] and whose build /// strategy is given by [builder]. @@ -664,7 +662,7 @@ class StreamBuilder extends StreamBuilderBase extends StatefulWidget { +class FutureBuilder extends StatefulWidget { /// Creates a widget that builds itself based on the latest snapshot of /// interaction with a [Future]. /// @@ -723,7 +721,7 @@ class FutureBuilder extends StatefulWidget { } /// State for [FutureBuilder]. -class _FutureBuilderState extends State> { +class _FutureBuilderState extends State> { /// An object that identifies the currently active callbacks. Used to avoid /// calling setState from stale callbacks, e.g. after disposal of this state, /// or after widget reconfiguration to a new Future.