From a7d35df1430c2e559616dcfe4513cbebbc829ec6 Mon Sep 17 00:00:00 2001 From: Mako-L Date: Fri, 21 Mar 2025 16:23:15 +0200 Subject: [PATCH] Return nodeName instead of anchorName on android like is done on iOS. Return nodeName instead of anchorName on android like is done on iOS. --- .../src/main/kotlin/com/uhg0/ar_flutter_plugin_2/ArView.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/android/src/main/kotlin/com/uhg0/ar_flutter_plugin_2/ArView.kt b/android/src/main/kotlin/com/uhg0/ar_flutter_plugin_2/ArView.kt index 1f8d8b3..b2fbd98 100644 --- a/android/src/main/kotlin/com/uhg0/ar_flutter_plugin_2/ArView.kt +++ b/android/src/main/kotlin/com/uhg0/ar_flutter_plugin_2/ArView.kt @@ -500,6 +500,7 @@ class ArView( if (node != null) { var anchorName: String? = null var currentNode: Node? = node + val nodeName = node.name while (currentNode != null) { anchorNodesMap.forEach { (name, anchorNode) -> if (currentNode == anchorNode) { @@ -511,7 +512,7 @@ class ArView( currentNode = currentNode.parent } if(handleTaps) { - objectChannel.invokeMethod("onNodeTap", listOf(anchorName)) + objectChannel.invokeMethod("onNodeTap", listOf(nodeName)) } true } else { @@ -1328,4 +1329,4 @@ class ArView( } -} \ No newline at end of file +}