You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
904 B
35 lines
904 B
2 years ago
|
part of '../neon_news.dart';
|
||
2 years ago
|
|
||
|
class NewsFeedIcon extends StatelessWidget {
|
||
|
const NewsFeedIcon({
|
||
|
required this.feed,
|
||
|
this.size = 48,
|
||
2 years ago
|
this.borderRadius,
|
||
2 years ago
|
super.key,
|
||
|
});
|
||
|
|
||
2 years ago
|
final NextcloudNewsFeed feed;
|
||
2 years ago
|
final double size;
|
||
2 years ago
|
final BorderRadius? borderRadius;
|
||
2 years ago
|
|
||
|
@override
|
||
2 years ago
|
Widget build(final BuildContext context) => ImageWrapper(
|
||
2 years ago
|
color: Colors.white,
|
||
2 years ago
|
width: size,
|
||
|
height: size,
|
||
2 years ago
|
borderRadius: borderRadius,
|
||
2 years ago
|
child: feed.faviconLink != null && feed.faviconLink != ''
|
||
2 years ago
|
? CachedURLImage(
|
||
2 years ago
|
url: feed.faviconLink!,
|
||
2 years ago
|
height: size,
|
||
|
width: size,
|
||
2 years ago
|
iconColor: Theme.of(context).colorScheme.primary,
|
||
2 years ago
|
)
|
||
|
: Icon(
|
||
|
Icons.rss_feed,
|
||
|
size: size,
|
||
|
color: Theme.of(context).colorScheme.primary,
|
||
|
),
|
||
2 years ago
|
);
|
||
|
}
|