File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
lib/headlines-search/widgets Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 1
1
import 'package:flutter/material.dart' ;
2
+ import 'package:go_router/go_router.dart' ; // Added
3
+ import 'package:ht_main/entity_details/view/entity_details_page.dart' ; // Added
4
+ import 'package:ht_main/router/routes.dart' ; // Added
2
5
import 'package:ht_shared/ht_shared.dart' ; // Import Source model
3
6
4
7
/// A simple widget to display a Source search result.
@@ -19,12 +22,10 @@ class SourceItemWidget extends StatelessWidget {
19
22
overflow: TextOverflow .ellipsis,
20
23
)
21
24
: null ,
22
- // TODO(you): Implement onTap navigation if needed for sources
23
25
onTap: () {
24
- // Example: Navigate to a page showing headlines from this source
25
- // context.goNamed('someSourceFeedRoute', params: {'id': source.id});
26
- ScaffoldMessenger .of (context).showSnackBar (
27
- SnackBar (content: Text ('Tapped on source: ${source .name }' )),
26
+ context.push (
27
+ Routes .sourceDetails,
28
+ extra: EntityDetailsPageArguments (entity: source),
28
29
);
29
30
},
30
31
);
You can’t perform that action at this time.
0 commit comments