The named parameter ‘colors’ isn’t defined.

Flutter projects sometimes give similar errors ” The named parameter ‘colors’ isn’t defined.” Generally, the solution is simple Flutter -clean Under File –> Invalidate Caches / Restart