Search code examples
flutterflutter-dependencies

Flutter packages get does not install new package


I'm trying to install a package (dynamic_theme) in flutter. When I run flutter packages get -v it does not even try to install the package.

So far I've tried:

  • Running flutter packages get
  • Running flutter packages get
  • Restarting my computer
  • Updated flutter
  • Added another package but that did not install either
  • Updated Android Studio

In my pubspec.yaml I've put:

dependencies:
  flutter:
    sdk: flutter
  firebase_core:
  cupertino_icons: ^0.1.2
  dynamic_theme: ^1.0.1 # the package does not install
  uuid: 2.0.0 # the package does not install

In the logs for the verbose run of flutter packages get where it installs the packages it outputs:

[ +422 ms] Running "flutter packages get" in quiz_app... (completed in 0.4s)
[  +57 ms] Found plugin firebase_core at E:\Other\SDKs\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_core-0.3.4\
[  +13 ms] Found plugin shared_preferences at E:\Other\SDKs\flutter\.pub-cache\hosted\pub.dartlang.org\shared_preferences-0.5.2\
[ +141 ms] Found plugin firebase_core at E:\Other\SDKs\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_core-0.3.4\
[   +6 ms] Found plugin shared_preferences at E:\Other\SDKs\flutter\.pub-cache\hosted\pub.dartlang.org\shared_preferences-0.5.2\
[  +26 ms] "flutter get" took 718ms.

I expected that flutter downloaded and installed the packages, but it does just check for updates on the already installed packages like firebase_core.


Solution

  • Something solved it randomly. I did not do anything but try multiple times. After some 10 attempts it downloaded and installed both uuid and dynamic_theme.