OudsTag constructor

  1. @Deprecated('Use named constructors for clarity: OudsTag.text() for text only type, OudsTag.icon() for text and icon type, or OudsTag.bullet() for text and bullet type.' ' This constructor will be removed in a future version.')
const OudsTag({
  1. Key? key,
  2. required String label,
  3. bool enabled = true,
  4. @Deprecated('Use iconStatus instead. This parameter will be removed in a future version.') OudsTagStatus? status,
  5. OudsTagAppearance appearance = OudsTagAppearance.emphasized,
  6. OudsTagSize? size = OudsTagSize.defaultSize,
  7. @Deprecated('icon is now defined by status (OudsIconStatus). Use Accent(icon: ...) or Neutral(icon: ...) for custom icons.') String? icon,
  8. OudsTagLayout layout = OudsTagLayout.textOnly,
  9. bool loading = false,
  10. bool roundedCorners = true,
})

⚠️ DEPRECATED: Use OudsTag.text, OudsTag.icon, or OudsTag.bullet constructors instead.

Implementation

@Deprecated(
  'Use named constructors for clarity: OudsTag.text() for text only type, OudsTag.icon() for text and icon type, or OudsTag.bullet() for text and bullet type.'
  ' This constructor will be removed in a future version.',
)
const OudsTag({
  super.key,
  required this.label,
  this.enabled = true,
  @Deprecated(
    'Use iconStatus instead. This parameter will be removed in a future version.',
  )
  final OudsTagStatus? status,
  this.appearance = OudsTagAppearance.emphasized,
  this.size = OudsTagSize.defaultSize,
  @Deprecated(
    'icon is now defined by status (OudsIconStatus). Use Accent(icon: ...) or Neutral(icon: ...) for custom icons.',
  )
  this.icon,
  this.layout = OudsTagLayout.textOnly,
  this.loading = false,
  this.roundedCorners = true,
}) : _deprecatedStatus = status,
     status = null;