The http.dart package file contains high level function and classes to manage and retrieve HTTP resources. 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. So in this tutorial we would Solve Target of URI doesn’t exist package:http/http.dart Error in Flutter iOS android project.
How this error looks like:
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.
Contents in this project Target of URI doesn’t exist package:http/http.dart Error Solution in Flutter:
1. To solve this error first we need to open pubspec.yaml file present in our Flutter project.
Complete source code of my pubspec.yaml file:
description: A new Flutter project.
sdk: ">=2.1.0 <3.0.0"
3. Open flutter project folder in Command Prompt or Terminal and execute flutter pub get command. This command would download and install the newly added http library.