When I was trying to create flutter project on my mac termial, It got stuck after a few moment. It showed the below error

Then i check my environment by running the command “flutter-doctor” and everything looked ok

After doing a bit of research I found that, the problem creating by not get pub files from pub servers. This is what I included later on in my .zshrc file.
Just do vim .zshrc in your mac terminal if you are doing latest mac and then type in the below three commands
export PUB_HOSTED_URL=https://pub.flutter-io.cn
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
export PATH=”$PATH:/Users/ahmeddastagir/Documents/Dev_Tools/Flutter/flutter/bin”
In the terminal it would be like the below

So the main problem was, flutter could not download pub files.
Once I included the pub file servers, it solved my problems.