Baseflow / flutter-permission-plugins

This repo contains a collection of permission related Flutter plugins which can be used to request permissions to access device resources in a cross-platform way.
https://baseflow.com
MIT License
52 stars 34 forks source link

Migrate to null safety #55

Closed wwwdata closed 3 years ago

wwwdata commented 3 years ago

This updates the dart SDK dependency to require a null safe dart version and also migrated the source code to be null safe. Also, set the version number to 4.0.0 because after this change the package is not compatible with non-null safe Flutter anymore.

This resolves #54

miguelflores1993 commented 3 years ago

no working pubspec location_permissions: ^4.0.0

wwwdata commented 3 years ago

no working pubspec location_permissions: ^4.0.0

@flutteresbolivia this is a pull request. Nothing is released yet :D If you want to use it already, however, you could fork my repo with the null-safety branch and use that instead of the package from pub.dev

Here is a guide how to add dependencies from Git repositories: https://dart.dev/tools/pub/dependencies#git-packages

aytunch commented 3 years ago

Could the maintainer of this package please check @wwwdata 's PR? Null safety version would be greatly appreciated.

doc-rj-celltrak commented 3 years ago

@mvanbeusekom any plans to merge in null safety support? Thanks!

emlynmac commented 3 years ago

Any chance to get this merged soon? It's one of the dependencies holding me up from migrating to null-safety.

wwwdata commented 3 years ago

Since this is open like forever now I would suggest you also just fork it and install this package from your git fork. There is no point in waiting for null safety migration because of one package. You would be missing out so much 😀

wwwdata commented 3 years ago

thanks for your response. Going to fix this quickly and will take a look into permission_handler and then maybe migrate to that 👍

aytunch commented 3 years ago

@mvanbeusekom This package has an Android specific Stream which emits the Location Services Status. But Permission-handler does not. It is essential for us. Are you planning on adding that functionality? Should I open up an issue?

Stream<ServiceStatus> get serviceStatus

mvanbeusekom commented 3 years ago

@aytunch we are planning to add it to the geolocator plugin but not to the permission_handler. We feel the permission_handler is about requesting permissions and getting information about permissions.

The location service status however is completely unrelated to permissions and therefor we feel it doesn't belong to the permission_handler.

aytunch commented 3 years ago

@mvanbeusekom thanks for the quick reply. That works as well. And tbh it fits better in geolocator. My objective is to have that stream in a maintained package. We are already using geolocator anyways:) Would you want me to open up an issue for porting this functionality in geolocator?

mvanbeusekom commented 3 years ago

@aytunch thank you for that offer but that won't be necessary, there is already an issue open for this and we actually started working on it last week so I expect some initial results in the coming weeks.

Here is the link to the issue: https://github.com/Baseflow/flutter-geolocator/issues/573

doc-rj-celltrak commented 3 years ago

Thanks for the good info @mvanbeusekom . Though, it's a little unsettling that there's no way to know when a plugin is "discontinued" or replaced by something better. Any channels I should be listening on?

mvanbeusekom commented 3 years ago

@doc-rj-celltrak you are 100% correct, we haven't really send out any official announcements yet. The location_permission plugin started out because we needed it as part of the geolocator plugin. However during evolution of the geolocator plugin it slowly started doing permission management internally and we kinda didn't spend any attention anymore to this plugin.

I will make sure we will start making it more clear to users not to use the plugin anymore and point them to better alternatives.

doc-rj-celltrak commented 3 years ago

@mvanbeusekom No worries, totally understand and thanks for your help. It's more of a general concern, i've noticed the same issue with maintenance of other plugins.