import 'package:flutter/material.dart'; import 'package:intl/intl.dart'; /// 카테고리별 구독 그룹의 헤더 위젯 /// /// 카테고리 이름, 구독 개수, 총 비용을 표시합니다. /// 참고: 여러 통화 단위가 혼합된 경우 간단히 원화 표시 형식을 사용합니다. class CategoryHeaderWidget extends StatelessWidget { final String categoryName; final int subscriptionCount; final double totalCost; const CategoryHeaderWidget({ Key? key, required this.categoryName, required this.subscriptionCount, required this.totalCost, }) : super(key: key); @override Widget build(BuildContext context) { return Padding( padding: const EdgeInsets.fromLTRB(20, 16, 20, 4), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text( categoryName, style: const TextStyle( fontSize: 16, fontWeight: FontWeight.w700, color: Color(0xFF374151), ), ), Text( '${subscriptionCount}개 · ${NumberFormat.currency(locale: 'ko_KR', symbol: '₩', decimalDigits: 0).format(totalCost)}', style: const TextStyle( fontSize: 12, fontWeight: FontWeight.w500, color: Color(0xFF6B7280), ), ), ], ), const SizedBox(height: 8), const Divider( height: 1, thickness: 1, color: Color(0xFFEEEEEE), ), ], ), ); } }