Reputation: 23
I have this problem when pub get my app
because flutter_twitter depends on flutter_link_preview ^1.0.3 which depends on http ^0.12.1, http ^0.12.1 is required"
I try to change http ^0.13.0 to http ^0.12.1 but have this problem
Because google_fonts 2.1.0 depends on http ^0.13.0 and no versions of google_fonts match >2.1.0 <3.0.0, google_fonts ^2.1.0 requires http ^0.13.0
this is pubspec:-
version: 1.0.6+11
environment:
sdk: ">=2.7.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
cupertino_icons: ^0.1.2
dartz: ^0.9.2
get_it: ^5.0.6
freezed_annotation: ^0.12.0
flutter_link_preview: ^1.0.3
cached_network_image: ^3.1.0
provider: ^4.3.2+2
firebase_auth: ^2.0.0
firebase_database:
firebase_analytics:
cloud_firestore:
firebase_storage:
equatable: ^2.0.0
http: ^0.12.1
image_picker: ^0.8.2
package_info: ^0.4.1
shared_preferences: ^0.5.1+2
firebase_messaging: ^10.0.3
google_sign_in: "^4.5.1"
intl: ^0.17.0
url_launcher:
share: ^2.0.4
google_fonts: ^2.1.0
firebase_remote_config: ^0.10.0+2
firebase_dynamic_links: ^2.0.6
qr_code_scanner: ^0.3.5
qr_flutter: ^3.2.0
rxdart: ^0.27.1
Upvotes: 2
Views: 1059
Reputation: 69
This was shared by AlphaMerc(creator of Fwitter, Twitter clone) : "Not really a good practice, but I managed to overcome the same situation by overriding the http dependency.
Add inside the pubspec.yaml file the following
dependency_overrides: http: ^0.13.3"
I tried the above and it works.
Upvotes: 0
Reputation: 2137
Update your library like this-
flutter_link_preview: http:
if you still face any issue, you can remove all version from every library/packages. It will work in every case.
Upvotes: 0
Reputation: 41
flutter_link_preview: ^1.0.3 change into flutter_link_preview:
Somtimes it will work.
Upvotes: 1