Error Http Dart Does Not Exist In flutter Android App

admin_img Posted By Bajarangi soft , Posted On 12-10-2020

The package file is fully platform independent and can run on both Android and iOS platforms. The http.dart package comes inbuilt with older flutter version but now we have to manually import and configure this into our project.

Error Flutter Http Dart Does Not Exist In Android App

Error Flutter Http Dart Does Not Exist
Target of URI doesn’t exist: ‘package:http/http.dart’ . Try Creating the file referenced by the URI, our Try using a URI for a file that dose exist. dart (uri_dose_not_exist), No quick fix available.
Solution : 
  -  To solve this error first we need to open pubspec.yaml file present in our Flutter project.
   -  Open pubspec.yaml file , Then Find line dependencies: and put http: ^0.12.0 just right after it and Save the file.

dependencies:
  http: ^0.12.0
  flutter:
    sdk: flutter


  - Open flutter project folder in Command Prompt or Terminal and run  flutter pub get command. 
  After executing above command, it will download and install the http.dart package in our project.

Related Post