Skip to content

Commit 5af106f

Browse files
committed
refactor(headlines-feed): update LoadSourceFilterData event
- Remove initialSelectedCountryIsoCodes and initialSelectedSourceTypes from LoadSourceFilterData - Add documentation for LoadSourceFilterData event - Adjust props in SourcesFilterEvent to remove country and source type selections
1 parent 343ef84 commit 5af106f

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

lib/headlines-feed/bloc/sources_filter_event.dart

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,27 @@ abstract class SourcesFilterEvent extends Equatable {
99
List<Object?> get props => [];
1010
}
1111

12+
/// {@template load_source_filter_data}
13+
/// Event triggered to load the initial data for the source filter page.
14+
///
15+
/// This event is dispatched when the `SourceFilterPage` is initialized.
16+
/// It fetches all available countries and sources, and initializes the
17+
/// internal state with any `initialSelectedSources` passed from the
18+
/// `HeadlinesFilterPage`. The country and source type capsule selections
19+
/// are ephemeral to the `SourceFilterPage` and are not passed via this event.
20+
/// {@endtemplate}
1221
class LoadSourceFilterData extends SourcesFilterEvent {
22+
/// {@macro load_source_filter_data}
1323
const LoadSourceFilterData({
1424
this.initialSelectedSources = const [],
15-
this.initialSelectedCountryIsoCodes = const {},
16-
this.initialSelectedSourceTypes = const {},
1725
});
1826

27+
/// The list of sources that were initially selected on the previous page.
1928
final List<Source> initialSelectedSources;
20-
final Set<String> initialSelectedCountryIsoCodes;
21-
final Set<SourceType> initialSelectedSourceTypes;
2229

2330
@override
2431
List<Object?> get props => [
2532
initialSelectedSources,
26-
initialSelectedCountryIsoCodes,
27-
initialSelectedSourceTypes,
2833
];
2934
}
3035

0 commit comments

Comments
 (0)