Skip to content

Commit 43b015d

Browse files
committed
feat(discover): display source logo in source list
- Replace static source icon with dynamic logo image - Add error handling to fall back to default icon if logo loading fails - Implement image clipping and sizing for better appearance
1 parent 25ae204 commit 43b015d

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

lib/discover/view/source_list_page.dart

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,19 @@ class _SourceListTile extends StatelessWidget {
216216
);
217217

218218
return ListTile(
219-
leading: const Icon(Icons.source_outlined),
219+
leading: SizedBox(
220+
width: 40,
221+
height: 40,
222+
child: ClipRRect(
223+
borderRadius: BorderRadius.circular(AppSpacing.sm),
224+
child: Image.network(
225+
source.logoUrl,
226+
fit: BoxFit.cover,
227+
errorBuilder: (context, error, stackTrace) =>
228+
const Icon(Icons.source_outlined),
229+
),
230+
),
231+
),
220232
title: Text(
221233
source.name,
222234
style: theme.textTheme.titleMedium,

0 commit comments

Comments
 (0)