bash: flutter: command not found on vscode, but it's work on terminal

I have a problem when running flutter doctor on vscode, the message is flutter: command not found, but it's fine when I running on terminal, I use macOS, how I can solve this problem? thanks