rootNode method

SurveyNode? rootNode()

Implementation

SurveyNode? rootNode() =>
    nodeById(rootNodeId) ?? (nodes.isEmpty ? null : nodes.first);