Optgroup constructor

Optgroup({
  1. required String label,
  2. String? className,
  3. Map<String, String>? attrs,
  4. List<BloomNode> children = const [],
})

Creates an <optgroup> element descriptor with label shorthand.

Implementation

Optgroup({
  required String label,
  super.className,
  Map<String, String>? attrs,
  super.children = const [],
}) : super(
        'optgroup',
        attrs: _mergeAttrs(attrs, {'label': label}),
      );