version: 1.0.0+1

environment:
  sdk: ">=2.7.0 <3.0.0"

dependencies:
  flutter:
    sdk: flutter
  hive: ^1.0.0
  hive_flutter: ^0.2.1
  path_provider: ^1.3.0

  # The following adds the Cupertino Icons font to your application.
  # Use with the CupertinoIcons class for iOS style icons.
  cupertino_icons: ^1.0.2

dev_dependencies:
  flutter_test:
    sdk: flutter
  integration_test:
    sdk: flutter
  build_runner: ^2.1.1
  hive_generator: ^0.5.1

pub get failed (1; Because depends on path_provider >=2.0.0 which requires SDK version >=2.12.0-259.9.beta <3.0.0, version solving failed.) exit code 1

how to fix it?


Solution 1: Mirko Raimo

Hi @Sreerekha and welcome to StackOverflow!

cupertino_icons: ^1.0.2 has null-safety enabled, so you have to:

  • upgrade your SDK to version 2.12 (or higher) and migrate all your app to null-safety,
  • or you have to downgrade the version of this dependency.

Unfortunately, you can't have the best of both worlds

How_to_migrate_to_null_safety

Cupertino_icons_versions

cupertino_icons_versions