PageShell constructor

PageShell({
  1. Object? nav,
  2. Object? header,
  3. Object? child,
  4. List<Object?> children = const [],
  5. Object? footer,
  6. Object maxWidth = 1200,
  7. Object padding = 24,
  8. Object gap = 32,
  9. bool safeArea = true,
  10. String? className,
  11. Map<String, Object?> props = const {},
  12. Map<String, Object?> style = const {},
  13. DartStyle? dartStyle,
  14. DartStyle? contentDartStyle,
})

Creates a centered page shell with configurable spacing and safe area.

Implementation

PageShell({
  Object? nav,
  Object? header,
  Object? child,
  List<Object?> children = const [],
  Object? footer,
  Object maxWidth = 1200,
  Object padding = 24,
  Object gap = 32,
  bool safeArea = true,
  String? className,
  Map<String, Object?> props = const {},
  Map<String, Object?> style = const {},
  DartStyle? dartStyle,
  DartStyle? contentDartStyle,
}) : super(
        'div',
        props: mergeComponentProps(
          props,
          className: className,
          dartStyle: DartStyle(
            minHeight: '100vh',
            display: Display.grid,
            gridTemplateColumns: 'minmax(0, 1fr)',
            gap: gap,
            padding: EdgeInsets.all(padding),
          ).merge(dartStyle),
          style: style,
        ),
        children: [
          if (nav != null) toFlintNode(nav),
          _content(
            header: header,
            child: child,
            children: children,
            footer: footer,
            maxWidth: maxWidth,
            safeArea: safeArea,
            contentDartStyle: contentDartStyle,
          ),
        ],
      );