Hello everyone, I've been dealing with vscode analyzing stuck and intellisense/autocomplete not working for a long time, I will share the solution of this problem as approved answer
I'm a macbook user, first I viewed the hidden files in the user/your_username/ folder.
user/your_username/.dartServer/.analysis-driver
I cleaned the inside of the file and restarted vscode. this worked for me.