debugListChildrenInOrder method Null safety

List<SemanticsNode> debugListChildrenInOrder(
  1. DebugSemanticsDumpOrder childOrder
)

Returns the list of direct children of this node in the specified order.

Implementation

List<SemanticsNode> debugListChildrenInOrder(DebugSemanticsDumpOrder childOrder) {
  assert(childOrder != null);
  if (_children == null) {
    return const <SemanticsNode>[];
  }

  switch (childOrder) {
    case DebugSemanticsDumpOrder.inverseHitTest:
      return _children!;
    case DebugSemanticsDumpOrder.traversalOrder:
      return _childrenInTraversalOrder();
  }
}