googlemaps / googlemaps/android-maps-compose
Create lint rules for Maps Compose
- Dominant language
- Kotlin
- Stars
- 1.3k
- Forks
- 181
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 18
Description
**Is your feature request related to a problem? Please describe.**
Maps Compose has frequently changing state that should not be read in composition. Example of this are:
* `MarkerPositionState.positon` - this changes frequently when a marker is dragged
* `CameraPositionState.position` - this changes frequently as the map's camera changes
**Describe the solution you'd like**
Provide lint rules that give warnings when the state mentioned above is read within composition.
**Describe alternatives you've considered**
Do nothing.
**Additional context**
Take a look at https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:compose/foundation/foundation-lint/src/test/java/androidx/compose/foundation/lint/LazyLayoutStateReadInCompositionDetectorTest.kt?q=firstVisibleItemIndex&start=21 and https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:compose/foundation/foundation-lint/src/main/java/androidx/compose/foundation/lint/LazyLayoutStateReadInCompositionDetector.kt;l=40?q=LazyLayoutStateReadInCom&sq= as an example
Contributor guide
Assessment
This issue has not been assessed yet.