skip to Main Content

I cannot see vector_math as a package but still flutter is giving me this error

"Because every version of flutter_test from sdk depends on vector_math 2.1.2 and every version of flutter from sdk depends on vector_math 2.1.4, flutter_test from sdk is incompatible with flutter from sdk."

How to deal with this issue ?

My Pubspec is like below

dependencies:


flutter:
    sdk: flutter


  # The following adds the Cupertino Icons font to your application.
  # Use with the CupertinoIcons class for iOS style icons.
  cupertino_icons: ^1.0.2
  google_fonts: ^4.0.4
  firebase_core: ^2.4.1
  flutter_otp_text_field: ^1.1.1
  page_transition: ^2.0.9
  flutter_displaymode: ^0.5.0
  table_calendar: ^3.0.8
  shimmer: ^2.0.0
  fluttertoast: ^8.1.1
  geolocator: ^9.0.2
  geocoding: ^2.0.5
  image_picker: ^0.8.6
  dio: ^4.0.6
  shared_preferences: ^2.0.15
  permission_handler: ^10.2.0
  firebase_messaging: ^14.2.1
  flutter_local_notifications: ^9.7.0
  webview_flutter: ^3.0.0
  cloud_firestore: ^4.3.1
  image: ^4.0.15
  in_app_update: ^4.0.1
  path_provider: ^2.0.13
  path: ^1.8.0
  qr_code_scanner: ^1.0.1
  flutter_speed_dial: ^6.2.0
  dropdown_search: ^3.0.1
  multi_image_picker: ^4.8.01
  camera: ^0.10.3+2
  get: ^4.6.5
  intl: ^0.18.0
  flutter_inappwebview: ^5.0.5
  flutter_launcher_icons: ^0.12.0
  location: ^4.4.0
  platform_device_id: ^1.0.1
  url_launcher: ^6.1.10

dependency_overrides:
  firebase_core_platform_interface: ^4.5.1

dev_dependencies:
  flutter_test:
    sdk: flutter
  beacons_plugin: ^2.0.8
  #device_info: ^1.0.0
  device_info_plus: ^8.1.0
  csv: ^5.0.1
  http: ^0.13.0
  flutter_archive: ^5.0.0
  web_socket_channel: ^2.3.0
  flutter_downloader: ^1.7.0

2

Answers


  1. Run flutter pub deps. Probably one of your dependencies rely on this package. This way you can identify which one.

    Login or Signup to reply.
  2. You need to run the following command to update the package dependencies in your local instance of the Flutter SDK (source).

    flutter update-packages --force-upgrade
    

    If you navigate to where you installed Flutter and locate the pubspec.yaml file at flutter -> packages -> flutter -> pubspec.yaml, you’ll see this in the comments.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search