Section<T> constructor

const Section<T>({
  1. required String title,
  2. List<Section<T>>? subSections,
  3. List<Entry<T>>? entries,
})

Implementation

const Section({required this.title, this.subSections, this.entries})
    : assert(
        subSections == null || entries == null,
        'Section cannot have both subSections and entries',
      ),
      assert(
        subSections != null || entries != null,
        'Section must have either subSections or entries',
      );