DuxtPageLayout class abstract

Base class for Duxt documentation layouts

Extends jaspr_content's PageLayoutBase with Duxt conventions.

Usage

class DocsLayout extends DuxtPageLayout {
  @override
  String get name => 'docs-layout';

  @override
  Component buildHeader(Page page) {
    return SiteHeader();
  }

  @override
  Component buildSidebar(Page page) {
    return DocsSidebar();
  }

  @override
  Component buildBody(Page page, Component child) {
    return div(classes: 'flex', [
      buildSidebar(page),
      main_(classes: 'flex-1', [child]),
    ]);
  }
}
Inheritance

Constructors

DuxtPageLayout()
const

Properties

hashCode int
The hash code for this object.
no setterinherited
name Pattern
The name pattern that the layout matches.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

buildBody(Page page, Component child) → Component
inherited
buildFooter(Page page) → Component
Build the page footer component
buildHead(Page page) Iterable<Component>
inherited
buildHeader(Page page) → Component
Build the page header component
buildLayout(Page page, Component child) → Component
Builds the layout for the given page and child component.
inherited
buildSidebar(Page page) → Component
Build the sidebar navigation component
buildToc(Page page) → Component?
Build the table of contents component (optional)
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