WidgetbookRoot constructor

WidgetbookRoot({
  1. required List<WidgetbookNode>? children,
  2. String? fileType,
})

Implementation

WidgetbookRoot({
  required super.children,
  super.fileType, // Changed to String for icon representation
}) : super(
        name: '',
        isInitiallyExpanded: true, // Pass fileType as a String
      ) {
  table = Map.fromEntries(
    leaves
        .whereType<WidgetbookUseCase>()
        .map((node) => MapEntry(node.path, node)),
  );
}