fluttercommunity / community

Flutter Community - A central place for community made Flutter content.
1.56k stars 121 forks source link

Package Proposal: flutter_native_timezone #111

Closed tjarvstrand closed 1 year ago

tjarvstrand commented 1 year ago

Package Proposal: flutter_native_timezone

Dependency name (as used in pubspec.yaml): flutter_native_timezone Current pub.dev link: https://pub.dev/packages/flutter_native_timezone Current Git repository link: https://github.com/pinkfish/flutter_native_timezone Description: A flutter plugin for getting the local timezone of the os. Current maintainer: Github user pinkfish Needs new maintainer after transfer: Yes New maintainer (if applicable): TBD. I could take this on but do not pretend to have any previous engagement with the package at all. Reason for transfer: This package provides functionality that is essential to many Flutter apps, but sadly seems to be abandoned. The last release was almost 18 months ago and the repo itself has not been touched for over a year. All recent issues and PRs have gone without answer. Comments: I know this is not a standard request, as I'm not the current maintainer, but please consider accepting this anyway so that future flutter app devs don't have to keep reinventing the wheel.

jeroen-meijer commented 1 year ago

Assigning and pinging @mhadaily since he runs GH operations these days.

Thanks for bringing this to our attention!

If the current maintainer @pinkfish stays stagnant on updates and many people use this (which seems to be the case considering it has 188 likes and 5 other packages depend on it on pub.dev), we could consider forking it and creating a plus version.

@slightfoot @mhadaily @tjarvstrand What do you think? 👀

tjarvstrand commented 1 year ago

What do you think? 👀

Sounds good to me!

If the current maintainer @pinkfish stays stagnant...

What sort of time frame are you thinking?

mhadaily commented 1 year ago

Thanks for the proposal.

The current maintainer must do the transfer, and then we can assign new maintainers to this package.

Unfortunately, we do not have enough capacity to fork this project and create another plus or another name for this package.

MaikuB commented 1 year ago

I asked about if it could be transferred at https://github.com/pinkfish/flutter_native_timezone/issues/45#issuecomment-1256209489 as I was thinking perhaps there's a need for another plugin now due to inactivity. However, given the author had contributed to the flutter_local_notifications plugin before (which I maintain), thought it would better to check with them. Of course, it would be better if they would transfer it though so the community can continue using an existing plugin but the maintainer appears to have been inactive for most of the year that I'm not sure we will get a response

carlfost commented 1 year ago

I was using the FlutterNativeTimezone.getLocalTimezone() function. I changed it to this:

import 'package:timezone/timezone.dart' as tz; import 'package:timezone/data/latest.dart' as tz;

initializeTimeZone() async { tz.initializeTimeZones(); var locations = tz.timeZoneDatabase.locations; // final locationName = await FlutterNativeTimezone.getLocalTimezone(); // tz.setLocalLocation(tz.getLocation(locationName)); DateTime dateTime = DateTime.now(); var locationName = ""; locations.forEach((key, value) { if (value.currentTimeZone.abbreviation == dateTime.timeZoneName && dateTime.timeZoneOffset.inMilliseconds == value.currentTimeZone.offset) { // print("$key Offset ${value.currentTimeZone.offset}"); locationName = key; } }); if (locationName != "") { print(locationName); tz.setLocalLocation(tz.getLocation(locationName)); } }

jeroen-meijer commented 1 year ago

@mhadaily I see.

Wouldn't we be able to adopt a fork as a plus package as long as we find a person to maintain it properly? I might be missing something but I don't see a lot of work involved for us if somebody takes this package under their wing.

mhadaily commented 1 year ago

We can do that. However, the coordination is still going to be on our shoulders which are already too many things, and it's hard to catch up with our limited resources.

We already have a few packages under FLC org with no maintainer, so the pressure is on us now.

As of now, I suggest the new maintainer, fork the package, rename it, and start contributing and publishing the box. Then open a new issue requesting to transfer the new package to FLC. we will consider that.

tjarvstrand commented 1 year ago

I have just published a fork on pub.dev.