hasData property

  1. @override
bool hasData
override

Returns whether this snapshot contains a non-null data value.

This can be false even when the asynchronous computation has completed successfully, if the computation did not return a non-null value. For example, a Future<void> will complete with the null value even if it completes successfully.

Implementation

@override
bool get hasData => data != null;