// AUTO-GENERATED widget — matches web .badge import 'package:flutter/material.dart'; import '../inou_theme.dart'; enum BadgeVariant { normal, care, comingSoon, processing } class InouBadge extends StatelessWidget { final String text; final BadgeVariant variant; const InouBadge({ super.key, required this.text, this.variant = BadgeVariant.normal, }); @override Widget build(BuildContext context) { final style = _getStyle(); final isUppercase = variant == BadgeVariant.comingSoon; return Container( padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 2), decoration: BoxDecoration( color: style.background, borderRadius: BorderRadius.circular(InouTheme.radiusSm), ), child: Text( isUppercase ? text.toUpperCase() : text, style: TextStyle( fontSize: variant == BadgeVariant.comingSoon ? 10 : 13, fontWeight: FontWeight.w500, color: style.foreground, letterSpacing: isUppercase ? 0.5 : 0, ), ), ); } _BadgeStyle _getStyle() { switch (variant) { case BadgeVariant.normal: return _BadgeStyle( background: InouTheme.accentLight, foreground: InouTheme.accent, ); case BadgeVariant.care: return _BadgeStyle( background: InouTheme.successLight, foreground: InouTheme.success, ); case BadgeVariant.comingSoon: return _BadgeStyle( background: InouTheme.bg, foreground: InouTheme.textMuted, ); case BadgeVariant.processing: return _BadgeStyle( background: InouTheme.accentLight, foreground: InouTheme.accent, ); } } } class _BadgeStyle { final Color background; final Color foreground; _BadgeStyle({required this.background, required this.foreground}); }