PortfolioShell constructor

PortfolioShell({
  1. Object? nav,
  2. Object? hero,
  3. Object? child,
  4. List<Object?> children = const [],
  5. Object? footer,
  6. Object maxWidth = 1120,
  7. String? className,
  8. Map<String, Object?> props = const {},
  9. Map<String, Object?> style = const {},
  10. DartStyle? dartStyle,
})

Creates a portfolio shell with centered content.

Implementation

PortfolioShell({
  Object? nav,
  Object? hero,
  Object? child,
  List<Object?> children = const [],
  Object? footer,
  Object maxWidth = 1120,
  String? className,
  Map<String, Object?> props = const {},
  Map<String, Object?> style = const {},
  DartStyle? dartStyle,
}) : super(
        'div',
        props: mergeComponentProps(
          props,
          className: className,
          dartStyle: DartStyle(
            minHeight: '100vh',
            background: ThemeToken.color(
              'pageBackground',
              fallback: '#0b1020',
            ).toCss(),
            color: ThemeToken.color('pageText', fallback: '#f8fafc').toCss(),
          ).merge(dartStyle),
          style: style,
        ),
        children: [
          if (nav != null) toFlintNode(nav),
          ConstrainedBox(
            maxWidth: maxWidth,
            center: true,
            dartStyle: const DartStyle(
              display: Display.grid,
              gap: 56,
              padding: EdgeInsets.symmetric(horizontal: 24, vertical: 32),
            ),
            children: [
              if (hero != null) hero,
              FlintElement(
                'main',
                children: normalizeChildren(child, children),
              ),
              if (footer != null) footer,
            ],
          ),
        ],
      );