Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is Flutter dependency required? #95

Closed
eseidel opened this issue May 12, 2021 · 3 comments
Closed

Is Flutter dependency required? #95

eseidel opened this issue May 12, 2021 · 3 comments

Comments

@eseidel
Copy link

eseidel commented May 12, 2021

I was attempting to use dio_http_cache from a pure dart command line app and ran into:

Resolving dependencies...
Because every version of dio_http_cache from path depends on flutter any from sdk which is forbidden, dio_http_cache from path is forbidden.
So, because flutter_eng_cycle_times depends on dio_http_cache from path, version solving failed.

Flutter users should run `flutter pub get` instead of `pub get`.
exit code 69

(I was using it from a path dependency, having previously thought it was related to the path, but rather it's due to me using dart pub get instead of flutter pub get. Sigh.

I don't see any code uses for flutter in lib/, just in examples/ Should the Flutter SDK dependency be removed from the main pubspec.yaml so this (otherwise-flutter-free) project can be used from non-Flutter Dart code?

Thanks for the consideration (and all the efforts on this package so far)!

@eseidel
Copy link
Author

eseidel commented May 12, 2021

I filed an issue with pub about the confusing error message: dart-lang/pub#2992

@eseidel
Copy link
Author

eseidel commented May 12, 2021

I've locally edited the pubspec. Looks like it comes through from sqflite:

[flutter_eng_cycle_times] dart pub get
Resolving dependencies...
Because every version of dio_http_cache from path depends on sqflite >=1.1.2 which requires the Flutter SDK, dio_http_cache from path is forbidden.
So, because flutter_eng_cycle_times depends on dio_http_cache from path, version solving failed.

Flutter users should run `flutter pub get` instead of `pub get`.
exit code 1

@eseidel
Copy link
Author

eseidel commented May 12, 2021

Looks like https://pub.dev/packages/dio_cache_interceptor might be the flavor I'm looking for.

Regardless, again thank you for all the hard work.

@eseidel eseidel closed this as completed May 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant