hasError property Null safety

bool hasError

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

This is always true if the asynchronous computation's last result was failure.

Implementation

bool get hasError => error != null;