I'm creating a full-text page using the API. That API body contains some data. I want to display that data without html tags.
For this, I'm trying to use import'package:flutter_html/flutter_html.dart';. Added the dependency but when I run the pub get I get the below error.
Error:
flutter pub get
Running "flutter pub get" in toyzania_app...
Because flutter_html >=2.0.0-nullsafety.1 <3.0.0-alpha.1 depends on flutter_svg >=0.22.0 <1.0.0 and countries_flag >=1.0.0 depends on flutter_svg ^2.0.4, flutter_html >=2.0.0-nullsafety.1 <3.0.0-alpha.1 is incompatible with countries_flag >=1.0.0.
So, because toyzania_app depends on both countries_flag ^1.0.0 and flutter_html ^2.2.1, version solving failed.
pub get failed (1; So, because toyzania_app depends on both countries_flag ^1.0.0 and flutter_html ^2.2.1, version solving failed.)
exit code 1
Pubspec file:
cached_network_image: ^3.2.3
carousel_slider: ^4.2.1
country_flags: ^1.0.0
cupertino_icons: ^1.0.2
video_player: ^2.5.1
flutter_html: ^2.2.1
How to solve this?
flutter_html: ^2.2.1toflutter_html:. This way flutter will automatically pick the correct and compatible version of library for you. You can also update the other libraries to the latest version and see if that fixes your issue.