I'm trying to add http package to my sample flutter project. However, it constantly fails.
It gives the following o/p
>[sample_hello_world] flutter packages get
>Running "flutter packages get" in sample_hello_world... 1.3s
>exit code 0
>[sample_hello_world] flutter packages get
>Running "flutter packages get" in sample_hello_world... 1.1s
>exit code 0
>[sample_hello_world] flutter packages get
>Running "flutter packages get" in sample_hello_world... 0.8s
>exit code 0
This is my pubspec.yaml
name: sample_hello_world description: A new Flutter project. version: 1.0.0+1
environment: sdk: ">=2.1.0 <3.0.0"
dependencies: flutter: sdk: flutter
cupertino_icons: ^0.1.2 shared_preferences: ^0.4.2 http: ^0.12.0
dev_dependencies: flutter_test: sdk: flutter
flutter: uses-material-design: true assets: - assets/login_icon.png
Any ideas, i/p will be appreciated.
I have tried different networks, checked for unwanted proxies. Can't get to know what is. I wrote and then tapped on the Get Packages button in Visual Studio IDE, but it never seems to load the package