Unable to use the http package in Flutter

I keep getting the following error when trying to use the http package.

enter image description here

I already added the package in pubspec.yaml:

dependencies:
  flutter:
    sdk: flutter

  # The following adds the Cupertino Icons font to your application.
  # Use with the CupertinoIcons class for iOS style icons.
  cupertino_icons: ^0.1.2 
  http: ^0.12.0+2 

1 answer

  • answered 2019-05-22 01:46 Sean Urgel

    in the terminal run flutter pub get