Skip to content

Commit c247b5b

Browse files
committed
refactor(headlines-search): rename Category to Topic
- Update widget name from CategoryItemWidget to TopicItemWidget - Replace Category with Topic in variable names and routing - Adjust UI elements to reflect the new naming convention
1 parent 1c68b29 commit c247b5b

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

lib/headlines-search/widgets/category_item_widget.dart

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,27 @@ import 'package:ht_main/entity_details/view/entity_details_page.dart';
44
import 'package:ht_main/router/routes.dart';
55
import 'package:ht_shared/ht_shared.dart';
66

7-
/// A simple widget to display a Category search result.
8-
class CategoryItemWidget extends StatelessWidget {
9-
const CategoryItemWidget({required this.category, super.key});
7+
/// A simple widget to display a Topic search result.
8+
class TopicItemWidget extends StatelessWidget {
9+
const TopicItemWidget({required this.topic, super.key});
1010

11-
final Category category;
11+
final Topic topic;
1212

1313
@override
1414
Widget build(BuildContext context) {
1515
return ListTile(
16-
title: Text(category.name),
17-
subtitle: category.description != null
16+
title: Text(topic.name),
17+
subtitle: topic.description != null
1818
? Text(
19-
category.description!,
19+
topic.description!,
2020
maxLines: 2,
2121
overflow: TextOverflow.ellipsis,
2222
)
2323
: null,
2424
onTap: () {
2525
context.push(
26-
Routes.categoryDetails,
27-
extra: EntityDetailsPageArguments(entity: category),
26+
Routes.topicDetails,
27+
extra: EntityDetailsPageArguments(entity: topic),
2828
);
2929
},
3030
);

0 commit comments

Comments
 (0)