-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Kotlin Flow extensions to maps-ktx and maps-v3-ktx #111
Labels
help wanted
We'd love to have community involvement on this issue.
released
type: feature request
‘Nice-to-have’ improvement, new feature or different behavior or design.
Comments
arriolac
added
help wanted
We'd love to have community involvement on this issue.
type: feature request
‘Nice-to-have’ improvement, new feature or different behavior or design.
labels
Feb 16, 2021
This was referenced Feb 16, 2021
This was referenced Apr 7, 2021
This was referenced May 4, 2021
arriolac
changed the title
Add Kotlin Flow extensions
Add Kotlin Flow extensions to maps-ktx
Jun 7, 2021
arriolac
changed the title
Add Kotlin Flow extensions to maps-ktx
Add Kotlin Flow extensions to maps-ktx and maps-v3-ktx
Jun 7, 2021
🎉 This issue has been resolved in version 3.1.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
help wanted
We'd love to have community involvement on this issue.
released
type: feature request
‘Nice-to-have’ improvement, new feature or different behavior or design.
Overview
This is a tracking bug for adding Kotlin Flow support to methods within the
maps-ktx
andmaps-v3-ktx
packages where applicable.Background
Version 2.1.0 of the KTX library added support for Kotlin flow through the introduction of the method
cameraEvents()
. As a continuation to this work, this issue is for adding extension methods returning Kotlin flows for methods that can be modeled as such. For example, set listener methods (e.g.setOnCameraIdleListener()
,setOnMapClickListener()
, and so on) are good candidates.Design
While
cameraEvents()
added support for Kotlin flow, this method wrapped several set listener methods and should be improved upon to aid in predictability for the Kotlin flow extension APIs. Specifically, wrapped methods should have a unique Kotlin flow API. In other words, the relationship between the extended method and the extension methods should be one-to-one, and not one-to-many. SincecameraEvents()
does not comply to this design, it should be removed or marked as deprecated in favor of the API convention described here.Method Naming
setOn
prefix should be dropped as well as theListener
suffix. Additionally,Events
should be added as a suffixsetOnCameraIdleListener()
→cameraIdleEvents()
setOnMapClickListener()
→mapClickEvents()
Developing
kotlin-flow
Classes to Extend
Contributing
Thinking of contributing? Awesome! Leave a comment below on what you'd like to add/work on so it's accounted for or any feedback on the design if you have any.
The text was updated successfully, but these errors were encountered: