StatusBadge constructor

StatusBadge({
  1. required String label,
  2. Object? icon,
  3. String? className,
  4. Map<String, Object?> props = const {},
  5. Map<String, Object?> style = const {},
  6. DartStyle? dartStyle,
  7. BadgeVariant variant = BadgeVariant.soft,
  8. Tone tone = Tone.neutral,
  9. ComponentSize size = ComponentSize.sm,
})

Creates a status badge.

Implementation

StatusBadge({
  required String label,
  Object? icon,
  String? className,
  Map<String, Object?> props = const {},
  Map<String, Object?> style = const {},
  DartStyle? dartStyle,
  BadgeVariant variant = BadgeVariant.soft,
  Tone tone = Tone.neutral,
  ComponentSize size = ComponentSize.sm,
}) : super(
       'span',
       props: mergeComponentProps(
         props,
         className: className,
         dartStyle: badgeComponentStyle(
           variant: variant,
           tone: tone,
           size: size,
         ).merge(dartStyle),
         style: style,
       ),
       children: [if (icon != null) toFlintNode(icon), FlintText(label)],
     );