panelAttrs function

Map<String, String> panelAttrs({
  1. required String groupId,
  2. required String panelId,
  3. bool expanded = false,
  4. bool exclusive = false,
})

Implementation

Map<String, String> panelAttrs({
  required String groupId,
  required String panelId,
  bool expanded = false,
  bool exclusive = false,
}) {
  final Map<String, String> out = <String, String>{
    'data-arcane-panel-group': groupId,
    'data-arcane-panel': panelId,
    'data-arcane-state': expanded ? 'expanded' : 'collapsed',
    'aria-expanded': expanded ? 'true' : 'false',
  };
  if (exclusive) out['data-arcane-panel-exclusive'] = 'true';
  return out;
}