Skip to content

Commit 343ef84

Browse files
committed
docs(headlines-feed): add SourceFilterPage documentation
- Add detailed documentation to SourceFilterPage class - Explain the purpose and functionality of the page - Clarify what information is returned and persisted - Remove unnecessary commented-out code
1 parent f6bfc1d commit 343ef84

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

lib/headlines-feed/view/source_filter_page.dart

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,24 @@ import 'package:flutter_news_app_mobile_client_full_source_code/l10n/l10n.dart';
1010
import 'package:ui_kit/ui_kit.dart';
1111

1212
// Keys are defined in headlines_filter_page.dart and imported by router.dart
13-
// const String keySelectedSources = 'selectedSources';
14-
// const String keySelectedCountryIsoCodes = 'selectedCountryIsoCodes';
15-
// const String keySelectedSourceTypes = 'selectedSourceTypes';
16-
13+
/// {@template source_filter_page}
14+
/// A page dedicated to selecting news sources for filtering headlines.
15+
///
16+
/// This page allows users to refine the displayed list of sources using
17+
/// country and source type capsules. However, these internal UI filter
18+
/// selections (country and source type) are *not* returned or persisted
19+
/// outside this page. Its sole purpose is to return the list of
20+
/// *explicitly checked* [Source] items.
21+
/// {@endtemplate}
1722
class SourceFilterPage extends StatelessWidget {
23+
/// {@macro source_filter_page}
1824
const SourceFilterPage({
1925
super.key,
2026
this.initialSelectedSources = const [],
21-
this.initialSelectedCountryIsoCodes = const {},
22-
this.initialSelectedSourceTypes = const {},
2327
});
2428

29+
/// The list of sources that were initially selected on the previous page.
2530
final List<Source> initialSelectedSources;
26-
final Set<String> initialSelectedCountryIsoCodes;
27-
final Set<SourceType> initialSelectedSourceTypes;
2831

2932
@override
3033
Widget build(BuildContext context) {

0 commit comments

Comments
 (0)