1
votes

In my app , I'm using Some packages

environment:
  sdk: ">=2.2.2 <3.0.0"
module:
  androidX: true

dependencies:
  flutter:
    sdk: flutter
  flutter_localizations:
    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.0
  google_maps_flutter: 1.0.3
  google_map_location_picker: 4.0.0
  mvc_pattern: 6.3.0
  global_configuration: 1.6.0
  http: 0.12.2
  html: 0.14.0+4
  shared_preferences: ^0.5.12+2
  flutter_html: 1.0.2
  flutter_svg: 0.18.1
  location: 3.0.2
  webview_flutter: 0.3.24
  url_launcher: 5.7.7
  firebase_messaging: 7.0.3
  cached_network_image: 2.3.3
  fluttertoast: 4.0.1
  flutter_staggered_grid_view: 0.3.2
  intl_utils: 1.8.0
  carousel_slider: 2.3.1
  cloud_firestore: 0.14.1+3
  firebase_auth: 0.18.1+2
  firebase_core: 0.5.0+1

And now I have some error in my pub

Because google_map_location_picker >=3.3.1 <4.1.3 depends on intl >=0.16.0 <=0.16.1 and every version of flutter_localizations from sdk depends on intl 0.17.0, google_map_location_picker >=3.3.1 <4.1.3 is incompatible with flutter_localizations from sdk.

So, because food_app depends on both flutter_localizations any from sdk and google_map_location_picker 4.0.0, version solving failed. pub get failed (1; So, because food_app depends on both flutter_localizations any from sdk and google_map_location_picker 4.0.0, version solving failed.)

and I'm trying to use any for packages and it makes more errors

So , How can I deal with this problem !

1

1 Answers

0
votes

Hey I have also got this kinda issue many times. And there is only one solution is to provide range for packages. Eg:

  flutter_polyline_points: ">=0.2.4 < 0.3.0"
  google_maps_flutter: ">=0.0.1 < 2.0.1"

Reason: Here your packages automatically choose stable package version.

Make sure to choose your left limit as lowest as possible version and right limit is latest version. You can check versions in version Section of Doc.