widgetAncestorChainOf function

String widgetAncestorChainOf(
  1. Object object
)

Implementation

String widgetAncestorChainOf(Object object) {
  if (object is RenderObject)
    return renderObjectWidgetAncestorChain(object, separator: '$dimGreenTextEsc ← $resetEsc');
  else if (object is BuildContext)
    return ancestorsString(object);
  else if (object is State)
    return ancestorsString(object.context);
  else
    return 'printAncestorChainOf doesn\'t know type of $object';
}