I’m encountering the following error when working with the web package in my Flutter project:
`Error: The getter ‘cFuture’ isn’t defined for the class ‘_EventStreamSubscription’.
- ‘_EventStreamSubscription’ is from ‘package:web/src/helpers/events/streams.dart’ (‘../../../../../.pub-cache/hosted/pub.dev/web-1.1.0/lib/src/helpers/events/streams.dart’).
Try correcting the name to the name of an existing getter, or defining a getter or field named ‘cFuture’.
final emptyFuture = cFuture.value();`
I was working with the web package in my project, and I accidentally made some changes inside the streams.dart file located in the pub-cache/hosted/pub.dev/web-1.1.0/lib/src/helpers/events/streams.dart file.
I then tried to save the file, and now I’m seeing the error above related to the cFuture getter, which is not defined in the class _EventStreamSubscription.
What I’ve tried:
I tried to look for any definition or usage of cFuture but couldn’t find it.
I ran flutter clean and flutter pub get to reset the package dependencies but the issue persists.
Questions:
How can I resolve this error? Is there something I should change in my project or the web package?
What might be causing this error related to cFuture?
How can I safely modify code in the pub-cache folder without causing issues?
Relevant Information:
Flutter version: [insert your Flutter version here]
web package version: 1.1.0
I’m using [insert your development environment here, e.g., Visual Studio Code, Android Studio, etc.]
Any help or insights would be greatly appreciated!
Abd Faris is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1