Browse Source

neon: Round feed icons

pull/50/head
jld3103 2 years ago
parent
commit
8219b75cf4
No known key found for this signature in database
GPG Key ID: 9062417B9E8EB7B3
  1. 1
      packages/neon/lib/src/apps/news/widgets/articles_view.dart
  2. 9
      packages/neon/lib/src/apps/news/widgets/feed_icon.dart
  3. 1
      packages/neon/lib/src/apps/news/widgets/feeds_view.dart

1
packages/neon/lib/src/apps/news/widgets/articles_view.dart

@ -209,6 +209,7 @@ class _NewsArticlesViewState extends State<NewsArticlesView> {
child: NewsFeedIcon( child: NewsFeedIcon(
feed: feed, feed: feed,
size: 16, size: 16,
borderRadius: const BorderRadius.all(Radius.circular(2)),
), ),
), ),
Flexible( Flexible(

9
packages/neon/lib/src/apps/news/widgets/feed_icon.dart

@ -4,18 +4,23 @@ class NewsFeedIcon extends StatelessWidget {
const NewsFeedIcon({ const NewsFeedIcon({
required this.feed, required this.feed,
this.size = 48, this.size = 48,
this.borderRadius,
super.key, super.key,
}); });
final NewsFeed feed; final NewsFeed feed;
final double size; final double size;
final BorderRadius? borderRadius;
@override @override
Widget build(final BuildContext context) => SizedBox( Widget build(final BuildContext context) => SizedBox(
width: size, width: size,
height: size, height: size,
child: ColoredBox( child: DecoratedBox(
color: Colors.white, decoration: BoxDecoration(
color: Colors.white,
borderRadius: borderRadius,
),
child: Center( child: Center(
child: feed.faviconLink != null && feed.faviconLink != '' child: feed.faviconLink != null && feed.faviconLink != ''
? CachedURLImage( ? CachedURLImage(

1
packages/neon/lib/src/apps/news/widgets/feeds_view.dart

@ -117,6 +117,7 @@ class NewsFeedsView extends StatelessWidget {
: Container(), : Container(),
leading: NewsFeedIcon( leading: NewsFeedIcon(
feed: feed, feed: feed,
borderRadius: const BorderRadius.all(Radius.circular(8)),
), ),
trailing: Row( trailing: Row(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,

Loading…
Cancel
Save