init method

  1. @mustCallSuper
void init(
  1. List<ContentDescriptor> descriptors
)

Implementation

@mustCallSuper
void init(List<ContentDescriptor> descriptors) {
  vyuh.content.register<ContentItem>(content);

  final userLayouts = descriptors.expand((element) =>
      element.layouts ?? <TypeDescriptor<LayoutConfiguration>>[]);
  final layouts = <TypeDescriptor<LayoutConfiguration>>{
    defaultLayoutDescriptor,
    ...userLayouts,
  }.toList(growable: false);

  _layouts
    ..clear()
    ..addAll(layouts);

  registerDescriptors<LayoutConfiguration>(layouts);
}