dartflutter

The named parameter 'child' isn't defined. in Center() constructor


I ran flutter upgrade today, and now I am getting an error that says-

[dart] The named parameter 'child' isn't defined.

The project is newly created and the default code is untouched, but it still has the same Error:


Solution

  • Actually, I reinstalled the flutter SDK to solve the problem. After a few days, the same error occurred, but then I Started hovering over the red line, after a minute, the error was solved automatically. I guess the SDK connects with internet to check for all the libraries and syntax stuff once we open the IDE.