I am getting an error using the Flutter's TextSelection.collapsed:
The named parameter 'offset' isn't defined. Try correcting the name to an existing named parameter's name, or defining a named parameter with the name 'offset'.
However, the Flutter API documentation lists offset as a required int parameter. What's the solution to this?

just reload your IDE:on VSCODE for example when you switch to flutter version 1.22.6 a notification appears to restart the IDE