Skip to content

Commit 544bf9f

Browse files
committed
feat(headlines): truncate long names on saved filters page
Refactors the `SavedHeadlinesFiltersPage` to ensure long filter names are truncated with an ellipsis. - The `Text` widget displaying the filter name is wrapped in a `Flexible` widget to handle overflow correctly within its `Row`. - This change creates a consistent single-line display for all filter names, improving UI stability and readability.
1 parent 59451c7 commit 544bf9f

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

lib/headlines-feed/view/saved_headlines_filters_page.dart

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,15 @@ class _SavedHeadlinesFiltersView extends StatelessWidget {
116116
title: Row(
117117
mainAxisSize: MainAxisSize.min,
118118
children: [
119-
Text(filter.name),
119+
// Use Flexible to ensure the Text widget truncates properly
120+
// within the Row, preventing layout overflow.
121+
Flexible(
122+
child: Text(
123+
filter.name,
124+
maxLines: 1,
125+
overflow: TextOverflow.ellipsis,
126+
),
127+
),
120128
if (filter.isPinned) ...[
121129
const SizedBox(width: AppSpacing.sm),
122130
Icon(

0 commit comments

Comments
 (0)