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 33 forks source link

[location_permissions] Supporting the v2 plugin embedding API #33

Closed singun-lxd closed 4 years ago

singun-lxd commented 4 years ago

🚀 Feature Requests

Flutter v1.12.13 stable has been published since 2019/12/11, now we are using new Android plugin APIs. According to https://flutter.dev/docs/development/packages-and-plugins/plugin-api-migration, we can use plugins easier in our flutter apps, e.g. we don't need to register plugins any more, they will be attached to engine automatically. location_permissions plugin is now using old APIs, and the is not compatible with new plugin framework.

Contextualize the feature

When the app is using v2 plugin embedding APIs, location_permissions plugin is not working, because the framework register the plugins using old APIs without Activity context. I can resolve the problem by calling FeatureLocationPlugin.registerWith in FlutterActivity.configureFlutterEngine, but I think it will be better if the new APIs is being used.

Describe the feature

https://flutter.dev/docs/development/packages-and-plugins/plugin-api-migration

Platforms affected (mark all that apply)

lslv1243 commented 4 years ago

I use this plugin because it is a dependency of https://github.com/Baseflow/flutter-geolocator and it started crashing after I updated to Flutter 1.17. Can we get this update please?

mvanbeusekom commented 4 years ago

We just release version 3.0.0 of this plugin which solves this issue, big thanks to @lslv1243 for making the pull-request.

P.s. I am currently updating the Geolocator plugin, to use this new version and will also be released later today.