The code you shared is probably not the code we need to see .. it's out of context.. need to see maybe the code for all the controllers and how you pass the URL to the StatefulWidget, etc.
Also, it is unlikely that WebView is a const .. since you are passing (or trying to use) a variable named urlForView ... ??
Any time you use ANY variables within the definition of a "Widget" it is NOT a const .. however, certain parameters WITHIN the invocation of the Widget could be const's. In this case, the javascriptMode maybe shoul dbe:
...
javascriptMode: const JavascriptMode.unrestricted,
...
But that's just a guess.. but certainly remove the "const" from the "const WebView" ..