Manually deleted package in External Libraries/Dart Packages not reappearring (Android Studio) - flutter

I manually deleted a package in External libraries/dart packages. Now I tried to run packages get again. The package(tesseract_ocr) did not appear in External libraries/dart packages.
I tried removing it in pubspec.yaml and re-adding it but did not appear again. I tried deleting .pub-cache and run packages get again. I tried flutter clean, flutter pub cache repair, flutter pub cache add tessarect_ocr and packages get so many times but none of them made tessarect_ocr package reappear in External libraries/dart packages. Please Help. Thanks in advance!

Try
dart pub cache clean
or
flutter pub cache clean

facing the same issue I did the following things:
1.
flutter pub cache clean
which reinstalled all the packages
2. `
flutter pub get
`
which update the dependencies and it works.

Related

Issue with Pub Get via dart extension in VSCode

I've got a problem where running pub get via the VSCode dart extension doesn't actually get the packages. It doesn't return an error but if I attempt to build my project, it will just continuously tell me my pubspec lock has updated since I last ran pub get.
Running flutter pub get via terminal solves the issue straight way.
Has anyone else experienced this with VSCode?
You can
delete pubspec.lock
then
flutter clean
Reinstall Extensions

flutter pub get won't download dependency

I deleted a package manually from Dart Package directory and deleted pubspec.lock. Now when I do flutter pub get it does not download that package again. I tried flutter clean && flutter pub get but it's not working as well. Please help I can't build my project now.
You can try to close and then open the editor and try:
flutter clean
flutter packages get
flutter packages upgrade

I cannot seem to download/install the carousel_slider package through pubspec.yaml

i have ran flutter pub get multiple times but I'm still not able to download the carousel_slider package
So far I've tried:
Running flutter clean
Running flutter packages get
Running flutter packages get
Restarting my computer
Updated flutter
Tried opening it in VSCode instead
Added another package (but that did install, I could see it in the Dart Packages)
I see that is working well, but you can try deleting the pubspect.lock
In the terminal write this commands:
flutter clean
flutter packages get

Flutter: Can I force flutter to install packages from pubspec.lock?

Does anyone know if you can do reproducible builds in Flutter? There doesn't seem to be an option to install from the pubspec.lock file. I would of expected something like:
flutter pub get --from-lockfile
The problem is that the pubspec.lock is modified on every run of flutter pub get so I can't easily go back to the previous state of the dependencies at different points in the git history.
I would of expected it to behave like the yarn.lock or package-lock.json which allow you to create reproducible builds of the project.
As mentioned in the doc, pub get should fetch what's in pubspec.lock if the lockfile contains the solution for the dependency requirements and constraints configured in pubspec.yaml. Simply put, if pubspec.yaml and pubspec.lock isn't modified, and neither Dart nor Flutter SDK is upgraded, then pub get should fetch what's listed in pubspec.lock.
If you're still having issues and can be reproducible, you can file an issue here https://github.com/dart-lang/pub/issues - as jonasfj also mentioned in the Comments.

Flutter Xcode build failed due to missing dependencies even when those have been deleted from pubspec.yalm

When I add a dependency to the pubspec.yaml file no matter if the IDE runs the pub get command or if I run it manually, it seems like the packages are being imported correctly (or that is what I think), however, if I "change my mind" and delete the package from the pubspec.yaml file, and again pub get, I am unable to build the app anymore, seems like the packages are still linked somehow to the app, even when there is no code related to them, the only way I can get back to work is by cleaning up all... e.g.
cd ios
cd ..
pod deintegrate
flutter clean
flutter pub cache repair
flutter pub get
cd ios
Pod install
Pod repo update
Maybe I am missing a step when working with dependencies.