findParentWhere method

dynamic findParentWhere (
  1. Component<Map, BaseState> component,
  2. bool condition(
    1. dynamic Component
    )
)

Implementation

static findParentWhere(Component component, bool condition(Component)) {
  if (condition(component)) {
    return component;
  }
  if (component.node.parent != null) {
    return findParentWhere(component.node.parent,condition);
  }
  return null;
}