[source] flutter.bat pub get Running "flutter pub get" in source...

Because rate_my_app >=0.6.0+3 depends on shared_preferences ^0.5.7 and fstore depends on shared_preferences 0.5.3+4, rate_my_app >=0.6.0+3 is forbidden.

So, because fstore depends on rate_my_app ^0.6.1+2, version solving failed. pub get failed (1; So, because fstore depends on rate_my_app ^0.6.1+2, version solving failed.) exit code 1

Here is my pubspec.yaml:

    name: fstore
description: Mobile commerce app by Flutter

# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
# followed by an optional build number separated by a +.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# In Android, build-name is used as versionName while build-number used as versionCode.
# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# `enter code here`https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.3.0+1

environment:
  sdk: ">=2.2.2 <3.0.0"

dependencies:
  logs:
    git: https://github.com/pq/logs
  flutter:
    sdk: flutter
  intl: 0.16.1
  http: 0.12.0+2
  html_unescape: 1.0.1+3
  provider: ^3.0.0+1
  flutter_signin_button: ^0.2.8
  after_layout: 1.0.7+2
  font_awesome_flutter: ^8.5.0
  path: 1.7.0
  flutter_facebook_login: ^2.0.1
  flutter_account_kit: 0.7.0
  vector_math: 2.0.8
  carousel_pro: ^1.0.0
  flutter_widget_from_html_core: ^0.2.2+1
  configurable_expansion_tile: ^1.0.0
  timeago: ^2.0.18
  share: ^0.6.2+1
  validate: ^1.7.0
  country_pickers: ^1.1.0
  shared_preferences: ^0.5.7
  firebase_messaging: 5.1.2
  firebase_analytics: 4.0.2
  transparent_image: 1.0.0
  pull_to_refresh: ^1.5.0
  localstorage: ^2.0.0
  notification_permissions: ^0.4.0
  flare_splash_screen: 2.1.3
  rate_my_app: ^0.6.0+3
  flutter_range_slider: ^1.3.1
  page_indicator: ^0.2.0
  global_configuration: ^1.1.0
  extended_image: 0.5.3
  flutter_screenutil: 0.5.3
  fluttertoast: ^3.1.0
  intro_slider: ^2.2.5
  url_launcher: ^5.1.0
  firebase_core: ^0.4.0+8
  firebase_auth: ^0.11.1+12
  cloud_firestore: ^0.12.7+1
  firestore_ui: ^1.6.0
  flutter_webview_plugin: ^0.3.5
  connectivity: ^0.4.3+6
  random_string: ^1.1.0
  google_maps_flutter: 0.5.19+2
  place_picker: 0.9.8
  cached_network_image: ^2.0.0-rc
  firebase_storage: ^3.0.4
  image_picker: ^0.6.0+17
  fab_circular_menu: 0.1.1
  uuid: ^2.0.2
  flutter_localizations:
    sdk: flutter

dev_dependencies:
  flutter_launcher_icons: ^0.7.2+1
  flutter_test:
    sdk: flutter

# Run this script to generate the app icon: flutter pub pub run flutter_launcher_icons:main
flutter_icons:
  android: "launcher_icon"
  ios: true
  image_path: "assets/images/app_icon.png"

# For information on the generic Dart part of this file, see the
# following page: https://www.dartlang.org/tools/pub/pubspec

# The following section is specific to Flutter.
flutter:

  uses-material-design: true
  assets:
    - lib/common/config.json
    - assets/icons/categories/
    - assets/icons/tabs/
    - assets/icons/profile/
    - assets/icons/payment/
    - assets/images/
    - assets/images/country/

  # An image asset can refer to one or more resolution-specific "variants", see
  # https://flutter.io/assets-and-images/#resolution-aware.

  # For details regarding adding assets from package dependencies, see
  # https://flutter.io/assets-and-images/#from-packages

  # To add custom fonts to your application, add a fonts section here,
  # in this "flutter" section. Each entry in this list should have a
  # "family" key with the font family name, and a "fonts" key with a
  # list giving the asset and other descriptors for the font. For
  # example:
  fonts:
    - family: Raleway
      fonts:
        - asset: assets/fonts/Raleway-Regular.ttf
        - asset: assets/fonts/Raleway-Medium.ttf
        - asset: assets/fonts/Raleway-Bold.ttf
        - asset: assets/fonts/Raleway-Light.ttf
        - asset: assets/fonts/Raleway-Thin.ttf
    - family: Roboto
      fonts:
        - asset: assets/fonts/Roboto-Regular.ttf
        - asset: assets/fonts/Roboto-Medium.ttf
        - asset: assets/fonts/Roboto-Bold.ttf
        - asset: assets/fonts/Roboto-Light.ttf
        - asset: assets/fonts/Roboto-Thin.ttf
  #
  # For details regarding fonts from package dependencies,
  # see https://flutter.io/custom-fonts/#from-packages

I have this problem how can i solve it?


Solution 1: Benjamin

I'd suggest looking here:

https://dart.dev/tools/pub/dependencies#dependency-overrides

You can override the version number of all dependencies, but be careful as later versions might contain breaking changes that your dependencies might not work with.


Solution 2: CopsOnRoad

In your pubspec.yaml file, add this:

dependency_overrides:
  rate_my_app: ^0.6.0+3


Solution 3: Omar Rakib

I have solved this. You need to update the rate_my_app to 0.6.0+3 and shared_preferences to 0.5.7+3 and then hit packages get.