Section constructor

Section({
  1. String? title,
  2. String? description,
  3. Object? actions,
  4. Object? child,
  5. List<Object?> children = const [],
  6. String? className,
  7. Map<String, Object?> props = const {},
  8. Map<String, Object?> style = const {},
  9. DartStyle? dartStyle,
})

Creates a section around child content.

Implementation

Section({
  String? title,
  String? description,
  Object? actions,
  Object? child,
  List<Object?> children = const [],
  String? className,
  Map<String, Object?> props = const {},
  Map<String, Object?> style = const {},
  DartStyle? dartStyle,
}) : super(
        'section',
        props: mergeComponentProps(
          props,
          className: className,
          defaultStyle: const {
            'display': 'grid',
            'gap': '14px',
            'margin-bottom': '24px',
          },
          dartStyle: dartStyle,
          style: style,
        ),
        children: [
          if (title != null || description != null || actions != null)
            _sectionHeader(title, description, actions),
          ...normalizeChildren(child, children),
        ],
      );