hemanthrajv / flutter_compass

MIT License
98 stars 141 forks source link

Revert minSdkVersion back to 20 #66

Open TheoLassonder opened 2 years ago

TheoLassonder commented 2 years ago

Recently the minSdkVersion was changed from 20 to 23 but there doesn't seem to be any reason for that. We are still supporting devices on API levels lower than 23, so can we please keep doing so?

aqinfh commented 2 years ago

I also used SDK 19 before. Unfortunately now must be at least v23.

TheoLassonder commented 2 years ago

@aqinfh I must be missing something - why must it be at least v23? When I set the minSdkVersion back to 20 it seems to work fine.

aqinfh commented 2 years ago

have you tried to make a release version? idk flutter tells me to update minsdk version, or downgrade flutter_compass version

TheoLassonder commented 2 years ago

@aqinfh Sorry I meant if I clone this repo and set the minSdkVersion back to 20 it seems to work fine on the device. I've created a pull request to change it back.

aqinfh commented 2 years ago

what version of flutter are you using? mine v2.5.0

TheoLassonder commented 2 years ago

Flutter 2.5.1

aqinfh commented 2 years ago

i'm using flutter with the same version now.

When i use Flutter compass 0.7.0. still need to update min sdkversion

image

TheoLassonder commented 2 years ago

@aqinfh I've cloned the compass repo and changed it to set the minSdkVersion back to 20 and then built my Flutter project with the cloned repo. There is special notation in pubspec.yml to refer to a (cloned) git (Github) repo.

aqinfh commented 2 years ago

what did you mean about "There is special notation in pubspec.yaml to refer to a (cloned) git (Github) repo"?

luis901101 commented 2 years ago

@aqinfh you can use:

flutter_compass: #^0.7.0 # Here the git ref is used because current 0.7.0 forces android min sdk to be 23
    git:
      url: https://github.com/hemanthrajv/flutter_compass.git
      ref: 14e134f0aed3c9fe09065bea05281f2c26f171d1

That is the special notation mentioned above, in this PR 67 the minSdkVersion is changed to 20. That PR is already merged so it should be available in the next version after 0.7.0. In the mean time you can use the git notation referencing the specific commit with the PR fix.