LayoutConfiguration<T extends ContentItem> class abstract

Base class for configuring the visual layout of a content item.

Layout configurations define how a content item should be presented on screen. They handle:

  • Visual structure and arrangement
  • Responsive design
  • Theme integration
  • Content-specific styling

Each content type can have multiple layout variants, allowing the same content to be displayed differently in different contexts.

Example:

class BlogPostLayout extends LayoutConfiguration<BlogPost> {
  @override
  Widget build(BuildContext context, BlogPost content) {
    return Column(
      children: [
        Text(content.title, style: Theme.of(context).textTheme.headlineLarge),
        Text(content.content),
      ],
    );
  }
}
Implemented types

Constructors

LayoutConfiguration.new({required String schemaType})
Creates an instance of LayoutConfiguration.
LayoutConfiguration.fromJson(Map<String, dynamic> json)
Converts the JSON representation of the layout configuration to an instance of LayoutConfiguration.
factory

Properties

contentType Type
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
schemaType String
The schema type of the content item.
final

Methods

build(BuildContext context, T content) Widget
Builds the layout widget tree for the given content item.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited