From 200ce2285cfccf6c84902d53190c4a1d984dc967 Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Tue, 19 May 2026 21:45:51 -0400 Subject: [PATCH] limit size of loading indicator for link previews --- lib/widgets/link_preview.dart | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/widgets/link_preview.dart b/lib/widgets/link_preview.dart index 8cb2a09..e20e955 100644 --- a/lib/widgets/link_preview.dart +++ b/lib/widgets/link_preview.dart @@ -12,14 +12,14 @@ class LinkPreview extends ConsumerWidget { const LinkPreview(this.link, {super.key}); @override - Widget build(BuildContext context, WidgetRef ref) => ref - .watch(UrlPreviewController.provider(link)) - .betterWhen( - data: (preview) => preview == null - ? SizedBox.shrink() - : ConstrainedBox( - constraints: BoxConstraints.loose(Size.fromWidth(400)), - child: InkWell( + Widget build(BuildContext context, WidgetRef ref) => ConstrainedBox( + constraints: BoxConstraints.loose(Size.fromWidth(400)), + child: ref + .watch(UrlPreviewController.provider(link)) + .betterWhen( + data: (preview) => preview == null + ? SizedBox.shrink() + : InkWell( onTap: () => ref .watch(LaunchHelper.provider) .launchUrl(Uri.parse(link)), @@ -64,6 +64,6 @@ class LinkPreview extends ConsumerWidget { ), ), ), - ), - ); + ), + ); }