singleSemanticNode method
Implementation
DebugCaptureSemanticNode singleSemanticNode({
String? role,
String? label,
Object? value,
bool? focused,
bool? selected,
String? action,
Map<String, Object?> stateContains = const <String, Object?>{},
}) {
final matches = semanticNodes(
role: role,
label: label,
value: value,
focused: focused,
selected: selected,
action: action,
stateContains: stateContains,
).toList(growable: false);
if (matches.length != 1) {
throw StateError(
'Expected exactly one debug-capture semantic node, found '
'${matches.length}.',
);
}
return matches.single;
}