Open setting.json file in vscode using Ctrl-P and then assign flutter sdk path
setting.json
Ctrl-P
"dart.flutterSdkPath": path,