findAncestorServiceByName<T extends ServerBinding> method

  1. @override
T? findAncestorServiceByName<T extends ServerBinding>(
  1. String name
)
override

Implementation

@override
T? findAncestorServiceByName<T extends ServerBinding>(String name) {
  Binding? ancestor = _owner;
  while (ancestor != null &&
      !(ancestor is T && ((ancestor).serviceRootName == name))) {
    ancestor = ancestor._owner;
  }
  return ancestor as T?;
}