@override Object get error { if (!hasError) throw StateError('No error has been emitted.'); return _latestError!; }