tjarvstrand / flutter_timezone

A fork of https://github.com/pinkfish/flutter_native_timezone
Apache License 2.0
42 stars 29 forks source link

The minSdkVersion bump to 26 is not needed, it restricts plugin usage #1

Closed MrCsabaToth closed 1 year ago

MrCsabaToth commented 1 year ago

The commit responsible for this https://github.com/tjarvstrand/flutter_timezone/commit/53e8462a23fc8bc5a644ecb33594738cd8c77826 references a page https://developer.android.com/reference/java/time/ZoneId. I see that ZoneId is added in SDK 26, but the usage of it should be optional. 26 min SDK level is too high.

MrCsabaToth commented 1 year ago

I think the version bump is a mistake! If you look at the FlutterTimezonePlugin.kt then both calls to ZoneId are properly guarded by if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O):

MrCsabaToth commented 1 year ago

I understand that some build tools may complain about either deprecated API calls or some other API calls (haven't remember seeing the latter) but it's not uncommon with native feature plugins to branch based on SDK level. I have users with devices with less than SDK level 26, and excluding them unnecessarily is not good (this is why the SD level based branch is there the first place).

tjarvstrand commented 1 year ago

Ah, yes. You're totally right. I jumped too fast on that one.

tjarvstrand commented 1 year ago

1.0.4 is out now