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 { ), ), ), - ), - ); + ), + ); }