diff --git a/src/main/java/io/github/ashwith/flutter/FlutterFinder.java b/src/main/java/io/github/ashwith/flutter/FlutterFinder.java index 5bf4d54..6feb6d8 100644 --- a/src/main/java/io/github/ashwith/flutter/FlutterFinder.java +++ b/src/main/java/io/github/ashwith/flutter/FlutterFinder.java @@ -85,8 +85,8 @@ public FlutterElement byText(String input) { public FlutterElement byAncestor(FlutterElement of, FlutterElement matching, boolean matchRoot, boolean firstMatchOnly) { Map matchIdentifier = new HashMap<>(ImmutableMap.of( FINDER_TYPE, "Ancestor", - "matchRoot", Boolean.toString(matchRoot), - "firstMatchOnly", Boolean.toString(firstMatchOnly) + "matchRoot", "true", + "firstMatchOnly", "false" )); matchIdentifier.put("of", of.getRawMap()); matchIdentifier.put("matching", matching.getRawMap()); @@ -100,8 +100,8 @@ public FlutterElement byAncestor(FlutterElement of, FlutterElement matching, boo public FlutterElement byDescendant(FlutterElement of, FlutterElement matching, boolean matchRoot, boolean firstMatchOnly) { Map matchIdentifier = new HashMap<>(ImmutableMap.of( FINDER_TYPE, "Descendant", - "matchRoot", Boolean.toString(matchRoot), - "firstMatchOnly", Boolean.toString(firstMatchOnly) + "matchRoot", "true", + "firstMatchOnly", "false" )); matchIdentifier.put("of", of.getRawMap()); matchIdentifier.put("matching", matching.getRawMap());