import 'package:flutter/material.dart'; import '../theme/tokens.dart'; import '../i18n/app_locale.dart'; /// 섹션 제목 + 「더 보기」. /// /// Figma 홈의 `TODAY'S QUEST` · `AI Daily Briefing` · `HOT ARCHIVE` · /// `인기 K-INSIDE` 가 전부 같은 모양이라 하나로 뺐다. class SectionHeader extends StatelessWidget { const SectionHeader({ super.key, required this.title, this.onMore, this.moreLabel, }); final String title; /// 「더 보기」 자리의 다른 문구. 브리핑은 이 자리가 「공유」다(Figma `266:90529`). final String? moreLabel; /// 없으면 「더 보기」를 그리지 않는다. final VoidCallback? onMore; @override Widget build(BuildContext context) { final text = Theme.of(context).textTheme; return Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Flexible( child: Text( title, style: text.titleLarge?.copyWith(fontWeight: FontWeight.w600), ), ), if (onMore != null) TextButton( onPressed: onMore, style: TextButton.styleFrom( padding: const EdgeInsets.symmetric(horizontal: AppSpace.s2), minimumSize: const Size(0, AppSizing.touchMinApp), foregroundColor: AppColors.onCosmicVariant, ), child: Row( mainAxisSize: MainAxisSize.min, children: [ Text(moreLabel ?? context.l10n.commonMore, style: text.bodySmall), const Icon(Icons.chevron_right, size: 16), ], ), ), ], ); } }