androidflutterandroid-studiodart

Android studio shows can not find Declaration to go to in flutter project


while working on a flutter project, Android studio behaving strangely for some of the dart files is shows Cannot find declaration to go to even for BuildContext. ( Project runs without any errors )

issue snapshot:

enter image description here

while some of the dart files in the same project are able to go to the declarations and find the references.

I have already tried the following methods:

None of the above methods worked for me, Is there any way to resolve this error? any suggestions or solutions would be very helpful.


Solution

  • I was able to resolve this issue just by deleting the @override and writing it again..

    enter image description here