setDefaultLayout method
bool
setDefaultLayout({
- required String schemaType,
- required LayoutConfiguration<
ContentItem> layout, - required FromJsonConverter<
LayoutConfiguration< fromJson,ContentItem> >
Sets the default layout for the schemaType
of the ContentItem
.
Returns true if the layout was set, false otherwise.
Implementation
bool setDefaultLayout({
required String schemaType,
required LayoutConfiguration layout,
required FromJsonConverter<LayoutConfiguration> fromJson,
}) {
final builder = contentBuilder(schemaType);
if (builder == null) {
return false;
}
builder.setDefaultLayout(layout, fromJson: fromJson);
return true;
}