loup-v / geolocation

Flutter geolocation plugin for Android and iOS.
Apache License 2.0
226 stars 93 forks source link

Dart SDK version (2.1.0) is not supported by geolocation #44

Closed isoos closed 4 years ago

isoos commented 6 years ago

From @markflarup on September 5, 2018 8:35

URL: https://pub.dartlang.org/packages/geolocation#-installing-tab-

I want to support geo location in an app, but after adding geolocation: ^0.2.1 as a dependency the following error message is returned:

The current Dart SDK version is 2.1.0-dev.0.0.flutter-be6309690f.

Because [APP] depends on geolocation >=0.1.1 which requires SDK version <2.0.0, version solving failed.
pub get failed (1)

Do you have a estimate for when it will be supported?

Copied from original issue: dart-lang/pub-dartlang-dart#1580

isoos commented 6 years ago

@markflarup this repository is for pub site, please file issues to the package's repository or contact the developer directly. I'm moving the issue.

aidooyaw1992 commented 6 years ago

hi please, when will this be supported

velegip commented 6 years ago

I think you can use this branch : https://github.com/driveddy/geolocation

markflarup commented 6 years ago

I think you can use this branch : https://github.com/driveddy/geolocation

I will look into it, thanks! :) As of now I have relied on geolocator (https://pub.dartlang.org/packages/geolocator)

alexlovar commented 6 years ago

Hi, why if the solution is only change the pubspec.yaml file adding the sdk support, as is already did by https://github.com/driveddy/geolocation, the package is not update in pub.dartlang.org/packages/geolocation ?

mi6crazyheart commented 6 years ago

My app also broke due to this Dart SDK version incompatibility. Guys, any time frame by when it'll get the fix? -.-

jiachen247 commented 6 years ago

upvote! This sdk change is breaking everything.

jiachen247 commented 6 years ago

geolocation: git: "https://github.com/loup-v/geolocation.git"

this worked for me. i think the dart package system is doing additional checks for dart 2 compatibility.

shehabic commented 6 years ago

I created a fork of this, from a form that works with Dart, 2.x, I also fixed android as it's broken here as well as adding an option to enable Location Services in case it's disabled on Android. https://github.com/shehabic/geolocation you can use it as

geolocation:
   git:
      url: 'https://github.com/shehabic/geolocation'
vashisth00 commented 4 years ago

Where do we add this? in pubspec.yaml? as a new dependency?

lukaspili commented 4 years ago

Sorry for the delay. It should be fixed in the latest release 1.0.0.