Flutter The lower bound of "sdk: '>=2.0.0-dev.68.0 <3.0.0'"

125 views Asked by At

Hello i have the following error on pub get yaml file of flutter app, how can fix this:

Error yaml:

Note: intl is pinned to version 0.18.1 by flutter_localizations from the flutter SDK.
See https://dart.dev/go/sdk-version-pinning for details.

The current Dart SDK version is 3.1.4.

Because easy_localization >=2.3.4-nullsafety <3.0.0-dev.0 depends on flutter_localizations from sdk and easy_localization >=3.0.0-dev.0 <3.0.0-nullsafety doesn't support null safety, easy_localization >=2.3.4-nullsafety <3.0.0-nullsafety requires flutter_localizations from sdk.
And because easy_localization <2.3.4-nullsafety doesn't support null safety, easy_localization <3.0.0-nullsafety requires flutter_localizations from sdk.
And because easy_localization >=3.0.0-nullsafety depends on flutter_localizations from sdk which depends on intl 0.18.1, every version of easy_localization requires intl 0.18.1.
So, because parking_4xp depends on both easy_localization any and intl ^0.17.0, version solving failed.

The lower bound of "sdk: '>=2.0.0-dev.68.0 <3.0.0'" must be 2.12.0 or higher to enable null safety.
For details, see https://dart.dev/null-safety

The lower bound of "sdk: '>=2.7.0 <3.0.0'" must be 2.12.0 or higher to enable null safety.
For details, see https://dart.dev/null-safety
Process finished with exit code 1

pubspec file

name: parking_4xp
description: App Parking 4XP

# The following line prevents the package from being accidentally published to
# pub.dev using `pub publish`. This is preferred for private packages.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev

# 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
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.0.0+30

environment:
  sdk: '>=2.12.0 <3.0.0'

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.4
  #  carousel_slider: ^4.0.0
  font_awesome_flutter: ^10.1.0
  #  qr: ^2.1.0
  easy_localization: any
  dio: ^4.0.6
  qr_flutter: ^4.1.0
  #  crclib: ^2.0.0
  crypto: ^3.0.1
  #  cure: ^0.1.0-nullsafety.0
  flutter_map: ^0.14.0
  map_launcher: ^2.2.1+2
  geolocator: ^9.0.2
  date_time_picker: ^2.1.0
  encrypted_shared_preferences: ^2.1.0
  pin_code_fields: ^8.0.1
  #  http: ^0.13.4
  #  webview_flutter: ^2.3.1
  #  basic_utils: ^4.2.0
  #  flutter_stripe: ^3.0.0
  dropdown_button2: ^1.4.0
  intl: ^0.17.0
  rflutter_alert: ^2.0.4
  toggle_switch: ^2.0.1
  fluttertoast: ^8.2.2
  flutter_fcm: ^1.0.12
#  nexi_payment: ^1.2.0

dependency_overrides:
  crypto: 3.0.0
dev_dependencies:
  flutter_test:
    sdk: flutter

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

# The following section is specific to Flutter.
flutter:

  # The following line ensures that the Material Icons font is
  # included with your application, so that you can use the icons in
  # the material Icons class.
  uses-material-design: true

  # To add assets to your application, add an assets section, like this:
  assets:
    - assets/translations/
    - images/parking.png
    - images/map_pin.png
    - images/icona_parking.png
    - images/no_ticket.png
    - images/logo_4xp_bianco.png
    - images/logo_4xp_nero.png
    - images/icona_ingresso.png
    - images/icona_modifica.png
    - images/icona_uscita.png
    - images/gate.png
    - images/money.png
  #   - images/a_dot_ham.jpeg

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

  # For details regarding adding assets from package dependencies, see
  # https://flutter.dev/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: Interstate
      fonts:
        - asset: assets/fonts/InterstatePlus Regular.ttf
        - asset: assets/fonts/InterstatePlus Light.ttf
          weight: 300
        - asset: assets/fonts/InterstatePlus Light Cond.ttf
          weight: 100
    - family: InterstateCondensed
      fonts:
        - asset: assets/fonts/InterstatePlus Light Cond.ttf
          weight: 100
  #   - family: Trajan Pro
  #     fonts:
  #       - asset: fonts/TrajanPro.ttf
  #       - asset: fonts/TrajanPro_Bold.ttf
  #         weight: 700
  #
  # For details regarding fonts from package dependencies,
  # see https://flutter.dev/custom-fonts/#from-packages
0

There are 0 answers