Recently have installed Flutter and exploring hello-world app. Followed all steps mentioned at https://flutter.io/get-started/ and was able to run
:: flutt
You might need to setup a self-signed certificate to make it work correctly by setting the following enviroment variables:
On Linux:
export DART_VM_OPTIONS="--root-certs-file={path.to.certificate.file}"
On Windows:
set https_proxy="--root-certs-file={path.to.certificate.file}"
I had the same issue. I am working in a company and I had to use https_proxy env variable to get connection.
Open cmd on Windows
set https_proxy=USERNAME:PASSWORD@hostname:port
flutter create
flutter run
flutter packages get
This worked for me, hope it helps!
Do this for windows environment
set https_proxy=USERNAME:PASSWORD@hostname:port
set http_proxy=USERNAME:PASSWORD@hostname:port
set NO_PROXY=localhost,127.0.0.1
before calling flutter create <flutter_project>
I was successful after setting the following windows environment variable.
Variable name: DART_VM_OPTIONS Variable value: --root-certs-file=path_to_cert
Where path_to_cert is the fully qualified path.