limit size of loading indicator for link previews
This commit is contained in:
parent
150de1a669
commit
200ce2285c
1 changed files with 10 additions and 10 deletions
|
|
@ -12,14 +12,14 @@ class LinkPreview extends ConsumerWidget {
|
||||||
const LinkPreview(this.link, {super.key});
|
const LinkPreview(this.link, {super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context, WidgetRef ref) => ref
|
Widget build(BuildContext context, WidgetRef ref) => ConstrainedBox(
|
||||||
|
constraints: BoxConstraints.loose(Size.fromWidth(400)),
|
||||||
|
child: ref
|
||||||
.watch(UrlPreviewController.provider(link))
|
.watch(UrlPreviewController.provider(link))
|
||||||
.betterWhen(
|
.betterWhen(
|
||||||
data: (preview) => preview == null
|
data: (preview) => preview == null
|
||||||
? SizedBox.shrink()
|
? SizedBox.shrink()
|
||||||
: ConstrainedBox(
|
: InkWell(
|
||||||
constraints: BoxConstraints.loose(Size.fromWidth(400)),
|
|
||||||
child: InkWell(
|
|
||||||
onTap: () => ref
|
onTap: () => ref
|
||||||
.watch(LaunchHelper.provider)
|
.watch(LaunchHelper.provider)
|
||||||
.launchUrl(Uri.parse(link)),
|
.launchUrl(Uri.parse(link)),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue