init method

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

Implementation

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

  registerDescriptors<LayoutConfiguration>(descriptors.expand((element) =>
      element.layouts ?? <TypeDescriptor<LayoutConfiguration>>[]));

  // Default layout could be registered explicitly by the ContentItem,
  // in which case, we don't do it again.
  if (!vyuh.content
      .isRegistered<LayoutConfiguration>(defaultLayoutDescriptor)) {
    registerDescriptors<LayoutConfiguration>([defaultLayoutDescriptor]);
  }
}