findRenderedComponentWithTypeV2 function

dynamic findRenderedComponentWithTypeV2(
  1. dynamic tree,
  2. ReactComponentFactoryProxy componentFactory
)

Same as scryRenderedComponentsWithTypeV2 but expects there to be one result and returns that one result, or throws exception if there is any other number of matches besides one.

Implementation

/* [1] */ findRenderedComponentWithTypeV2(/* [1] */ tree, ReactComponentFactoryProxy componentFactory) {
  return _findRenderedComponentWithType(tree, getComponentTypeV2(componentFactory));
}