ComponentLibrary.of constructor

ComponentLibrary.of(
  1. Iterable<LayoutDocument> documents
)

The definitions of documents (those that are components, by their widget.type; a later one of the same type wins).

Implementation

factory ComponentLibrary.of(Iterable<LayoutDocument> documents) => ComponentLibrary({
  for (final d in documents)
    if (d.componentType case final String t) t: d,
});