'flutter_session and shared_preferences not work together in flutter?
Because hr depends on flutter_session ^0.1.1 which depends on shared_preferences ^0.5.8, shared_preferences ^0.5.8 is required. So, because hr depends on shared_preferences ^2.0.4, version solving failed. pub get failed (1; So, because hr depends on shared_preferences ^2.0.4, version solving failed.) Process finished with exit code 1
my pubspec.yaml code
dependencies:
flutter:
sdk: flutter
flutter_session: ^0.1.1
shared_preferences: ^2.0.4
how to overcome it?
Solution 1:[1]
flutter_session: ^0.1.1 depends on dart sdk 2.7.0 whilst shared_preferences: ^2.0.4 depends on dart sdk 2.12, hence the error.
you might have to use this pull request for flutter_session which is updated to flutter 2.0 and latest dart sdk
https://github.com/jhourlad/flutter_session/pull/11
in pubspec.yaml
flutter_session:
git:
url: https://github.com/RomanIvn/flutter_session.git
ref: master
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |
