Launching lib/main.dart on macOS in debug mode...
lib/main.dart:7:9: Error: The getter 'ws' isn't defined for the class 'BuildContext'.
- 'BuildContext' is from 'package:get_server/src/core/server.dart' ('../../../../Apps/flutter/.pub-cache/hosted/pub.dartlang.org/get_server-1.1.0/lib/src/core/server.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'ws'.
res.ws.listen((socket) {
^^
lib/main.dart:6:21: Error: A non-null value must be returned since the return type 'Widget' doesn't allow null.
- 'Widget' is from 'package:get_server/src/core/server.dart' ('../../../../Apps/flutter/.pub-cache/hosted/pub.dartlang.org/get_server-1.1.0/lib/src/core/server.dart').
app.ws('/socket', (res) {
It seems that the ws property isn't defined in the GetServer's BuildContext class. What I'm missing here? thanks.
Hi, I followed your example in the README.md, the "Like most of the node.js way" section, tried to run it like this (in main.dart):
And then, this error shows up:
It seems that the
ws
property isn't defined in the GetServer'sBuildContext
class. What I'm missing here? thanks.