Home > Enterprise >  Error with different versions of the same package Flutter
Error with different versions of the same package Flutter

Time:05-17

How to fix this error?

Because syncfusion_flutter_charts >=20.1.55 depends on syncfusion_flutter_core ^20.1.55 and syncfusion_flutter_pdfviewer 19.4.56-beta depends on syncfusion_flutter_core ^19.4.56, syncfusion_flutter_charts >=20.1.55 is incompatible with syncfusion_flutter_pdfviewer 19.4.56-beta.
And because no versions of syncfusion_flutter_pdfviewer match >19.4.56-beta <20.0.0, syncfusion_flutter_charts >=20.1.55 is incompatible with syncfusion_flutter_pdfviewer ^19.4.56-beta.
So, because admin_m32 depends on both syncfusion_flutter_pdfviewer ^19.4.56-beta and syncfusion_flutter_charts ^20.1.55, version solving failed.
pub get failed (1; So, because admin_m32 depends on both syncfusion_flutter_pdfviewer ^19.4.56-beta and syncfusion_flutter_charts ^20.1.55, version solving failed.)

How to specify different versions for the same package?

CodePudding user response:

Best way is update your syncfusion_flutter_pdfviewer to 20.1.55-beta, but if you still need to use current version, you can override in pubspec.yaml file :

dependency_overrides:
  syncfusion_flutter_core: ^20.1.55
  • Related