Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions lib/screens/today/today_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -162,11 +162,12 @@ class _CategoryFilter extends StatelessWidget {

@override
Widget build(BuildContext context) {
return SizedBox(
height: 34,
child: ListView(
scrollDirection: Axis.horizontal,
padding: const EdgeInsets.symmetric(horizontal: 20),
// 고정 높이 대신 콘텐츠(아이콘+글씨)에 맞춰 세로로 늘어나게 한다 — 큰 글씨 배율에서도
// 텍스트가 세로로 짤리지 않도록(가로 스크롤은 유지).
return SingleChildScrollView(
scrollDirection: Axis.horizontal,
padding: const EdgeInsets.symmetric(horizontal: 20),
child: Row(
children: <Widget>[
DkChoiceChip(
label: '전체',
Expand Down
18 changes: 18 additions & 0 deletions test/today_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,24 @@ void main() {
expect(chipIconColor('자격증'), isNot(chipIconColor('건강')));
});

testWidgets('필터 칩은 고정 높이에 갇히지 않고 콘텐츠 고유 높이로 그려진다(짤림 방지)', (
WidgetTester tester,
) async {
const DkEvent a = DkEvent(
id: 'a',
type: DkEventType.single,
title: '정처기',
category: '자격증',
date: '2026-12-01',
);
await _pumpTall(tester, _screen(events: const <DkEvent>[a]));

// 예전엔 SizedBox(height: 34) 로 칩을 34 에 강제해, SeedChip 자연 높이(padY 9 + fontSize
// 14 → 약 41)보다 작아 텍스트가 세로로 짤렸다. 이제 콘텐츠 고유 높이로 그려져 34 를 넘긴다.
final double h = tester.getSize(find.byType(DkChoiceChip).first).height;
expect(h, greaterThan(34));
});

testWidgets('카테고리 필터 탭 시 해당 카테고리만 보인다(#163)', (WidgetTester tester) async {
const DkEvent a = DkEvent(
id: 'a',
Expand Down
Loading