GetGeoPointForScreenOffset
val GetGeoPointForScreenOffset: SemanticsPropertyKey<AccessibilityAction<(Offset, CompletableDeferred<GeoPoint?>) -> Boolean>>
Custom semantics property key to retrieve geographical coordinates for a given Offset.
The associated action calculates the geographical point corresponding to the provided Offset and appends the result to the provided CompletableDeferred of GeoPoint. If the provided Offset does not correspond to a valid geographical point, null coordinates are appended.
Example usages:
@Test
fun testGetGeoPointForScreenOffset() {
val result = CompletableDeferred<GeoPoint?>()
composeTestRule.onNodeWithTag("test_tag")
.performSemanticsAction(MapSemanticActions.GetGeoPointForScreenOffset) { action ->
action(Offset(-10f, -10f), result)
}
}Content copied to clipboard