I am getting the above problem, updated the packages too by using the below command : 
"flutter packages upgrade".
Restarted the visual studio code, but didn't solve the problem.
Can anyone help me in resolving.

[![screenshot](https://i.stack.imgur.com/sa9FM.png)](https://i.stack.imgur.com/sa9FM.png)

Thanks.