File tree Expand file tree Collapse file tree 3 files changed +32
-0
lines changed Expand file tree Collapse file tree 3 files changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import 'package:ht_main/headlines-feed/widgets/headline_item_widget.dart';
11
11
import 'package:ht_main/l10n/l10n.dart' ;
12
12
import 'package:ht_main/router/routes.dart' ;
13
13
import 'package:ht_main/shared/constants/constants.dart' ;
14
+ import 'package:ht_main/shared/shared.dart' ;
14
15
import 'package:ht_main/shared/widgets/failure_state_widget.dart' ;
15
16
import 'package:ht_main/shared/widgets/loading_state_widget.dart' ;
16
17
// Import Source
@@ -166,6 +167,21 @@ class _HeadlinesFeedPageState extends State<HeadlinesFeedPage> {
166
167
return const SizedBox .shrink ();
167
168
168
169
case HeadlinesFeedLoaded ():
170
+ if (state.headlines.isEmpty) {
171
+ // If the list is empty, show an informative message using the
172
+ // shared InitialStateWidget. This is especially relevant after
173
+ // filters are applied and yield no results, or if the initial
174
+ // unfiltered feed is empty.
175
+ return InitialStateWidget (
176
+ icon:
177
+ Icons
178
+ .search_off_outlined, // Visually indicates no results
179
+ headline:
180
+ l10n.headlinesFeedEmptyFilteredHeadline, // Placeholder l10n
181
+ subheadline:
182
+ l10n.headlinesFeedEmptyFilteredSubheadline, // Placeholder l10n
183
+ );
184
+ }
169
185
// Display the list of headlines with pull-to-refresh
170
186
return RefreshIndicator (
171
187
onRefresh: () async {
Original file line number Diff line number Diff line change 549
549
"emailCodeValidationLengthError": "يجب أن يتكون الرمز من 6 أرقام.",
550
550
"@emailCodeValidationLengthError": {
551
551
"description": "Validation error when the email verification code is not 6 digits."
552
+ },
553
+ "headlinesFeedEmptyFilteredHeadline": "لا توجد عناوين تطابق فلاترك",
554
+ "@headlinesFeedEmptyFilteredHeadline": {
555
+ "description": "Headline text shown when headline filters result in an empty list"
556
+ },
557
+ "headlinesFeedEmptyFilteredSubheadline": "حاول تعديل معايير الفلترة أو مسحها لرؤية جميع العناوين.",
558
+ "@headlinesFeedEmptyFilteredSubheadline": {
559
+ "description": "Subheadline text shown when headline filters result in an empty list"
552
560
}
553
561
}
Original file line number Diff line number Diff line change 549
549
"emailCodeValidationLengthError": "The code must be 6 digits.",
550
550
"@emailCodeValidationLengthError": {
551
551
"description": "Validation error when the email verification code is not 6 digits."
552
+ },
553
+ "headlinesFeedEmptyFilteredHeadline": "No Headlines Match Your Filters",
554
+ "@headlinesFeedEmptyFilteredHeadline": {
555
+ "description": "Headline text shown when headline filters result in an empty list"
556
+ },
557
+ "headlinesFeedEmptyFilteredSubheadline": "Try adjusting your filter criteria or clearing them to see all headlines.",
558
+ "@headlinesFeedEmptyFilteredSubheadline": {
559
+ "description": "Subheadline text shown when headline filters result in an empty list"
552
560
}
553
561
}
You can’t perform that action at this time.
0 commit comments