getComponentByTestId function
Returns the react.Component
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
react.Component? getComponentByTestId(dynamic root, String value, {String key = defaultTestIdKey}) {
var instance = getByTestId(root, value, key: key);
if (instance != null) {
return getDartComponent(instance);
}
return null;
}