Returns the data. An error is thrown if data is null.
null
T get requireData { if (hasData) return data!; if (hasError) Error.throwWithStackTrace(error!, stackTrace!); throw StateError('Snapshot has neither data nor error.'); }