createDefault static method
A simplified approach to creating a ContentDescriptor that follows the standard conventions.
This eliminates the need to create a new <Item>ContentDescriptor.
schemaType is ContentItem's schemaType.
title of the descriptor.
Returns a function that takes in a list of TypeDescriptor<LayoutConfiguration>. This is the function
that will be used by consuming features to pass in new layouts for the ContentItem.
Implementation
static ContentDescriptorFactory createDefault(
{required String schemaType, required String title}) {
return ({List<TypeDescriptor<LayoutConfiguration>>? layouts}) =>
_DefaultContentDescriptor(
schemaType: schemaType,
title: title,
layouts: layouts,
);
}