getPropsByTestId function
Returns the props of the first descendant of root
that has its key
prop value set to value
.
Returns null if no descendant has its key
prop value set to value
.
Implementation
Map? getPropsByTestId(dynamic root, String value, {String key = defaultTestIdKey}) {
var instance = getByTestId(root, value, key: key);
if (instance != null) {
return getProps(instance);
}
return null;
}