Create lint rules for Maps Compose #218
Labels
priority: p3
Desirable enhancement or fix. May not be included in next release.
type: feature request
‘Nice-to-have’ improvement, new feature or different behavior or design.
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 draggedCameraPositionState.position
- this changes frequently as the map's camera changesDescribe 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
The text was updated successfully, but these errors were encountered: