Skip to content

Commit 63a87ac

Browse files
committed
feat(account): add source logo to follow page
- Add Image.network widget to display source logo - Use ClipRRect to apply rounded corners to the logo - Implement error handling for image loading with Icon fallback - Adjust layout to include logo with existing title and trailing icon
1 parent 43b015d commit 63a87ac

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

lib/account/view/followed_contents/sources/add_source_to_follow_page.dart

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,19 @@ class AddSourceToFollowPage extends StatelessWidget {
7070
return Card(
7171
margin: const EdgeInsets.only(bottom: AppSpacing.sm),
7272
child: ListTile(
73+
leading: SizedBox(
74+
width: 40,
75+
height: 40,
76+
child: ClipRRect(
77+
borderRadius: BorderRadius.circular(AppSpacing.sm),
78+
child: Image.network(
79+
source.logoUrl,
80+
fit: BoxFit.cover,
81+
errorBuilder: (context, error, stackTrace) =>
82+
const Icon(Icons.source_outlined),
83+
),
84+
),
85+
),
7386
title: Text(source.name),
7487
trailing: IconButton(
7588
icon: isFollowed

0 commit comments

Comments
 (0)