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
It happens because of the old cache. Just clean the cache with the following command
flutter clean cache