79198283

Date: 2024-11-17 22:31:35
Score: 1
Natty:
Report link

The answer by @matpag is correct. But the same thing you can do with a more concise API

fun withRole(role: Role) = SemanticsMatcher.expectValue(SemanticsProperties.Role, role)

Here, SemanticsMatcher.expectValue is the extension method on SemanticsMatcher. There are more methods like keyIsDefined and keyNotDefined

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • User mentioned (1): @matpag
Posted by: AndroidEngineX