debugDescribeFocusTree function

String debugDescribeFocusTree ()

Returns a text representation of the current focus tree, along with the current attributes on each node.

Will return an empty string in release builds.

Implementation

String debugDescribeFocusTree() {
  assert(WidgetsBinding.instance != null);
  String result;
  assert(() {
    result = WidgetsBinding.instance.focusManager.toStringDeep();
    return true;
  }());
  return result ?? '';
}