0

I am trying to run a flutter theme code in visual studio code and facing this issue after running command (flutter run)

Because every version of flutter_test from sdk depends on vector_math 2.1.0-nullsafety.5 and fstore depends on vector_math 2.0.8, flutter_test from sdk is forbidden. So, because fstore depends on flutter_test any from sdk, version solving failed. Running "flutter pub get" in ecomputex...
pub get failed (1; So, because fstore depends on flutter_test any from sdk, version solving failed.)

Please helpenter image description here

1 Answers1

0

just add this line of code in your pubspec

dependency_overrides:
  vector_math: 2.1.0-nullsafety.5

this will override the dependency, and you can use whatever version you want. you might need to change it the version of the package.

my code example:

dependencies:
  flutter:
    sdk: flutter

  cupertino_icons: ^1.0.0
  file_picker: ^3.0.0
  hive: ^2.0.0
  hive_flutter: ^1.0.0

dependency_overrides:
  path_provider: 2.0.1
SinaMN75
  • 6,742
  • 5
  • 28
  • 56