setDefaultLayout method

dynamic setDefaultLayout(
  1. LayoutConfiguration<Unknown> layout, {
  2. required FromJsonConverter<LayoutConfiguration<ContentItem>> fromJson,
})
inherited

Implementation

setDefaultLayout(LayoutConfiguration<T> layout,
    {required FromJsonConverter<LayoutConfiguration> fromJson}) {
  _defaultLayout = layout;

  final currentLayoutSchemaType = _defaultLayoutDescriptor.schemaType;

  _defaultLayoutDescriptor = TypeDescriptor<LayoutConfiguration>(
    schemaType: currentLayoutSchemaType,
    fromJson: fromJson,
    title: 'Override Layout for ${content.schemaType}',
  );
  registerDescriptors<LayoutConfiguration>([_defaultLayoutDescriptor]);
}