Remove flutter chat #26
1 changed files with 10 additions and 10 deletions
limit size of loading indicator for link previews
commit
200ce2285c
|
|
@ -12,14 +12,14 @@ class LinkPreview extends ConsumerWidget {
|
|||
const LinkPreview(this.link, {super.key});
|
||||
|
||||
@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))
|
||||
.betterWhen(
|
||||
data: (preview) => preview == null
|
||||
? SizedBox.shrink()
|
||||
: ConstrainedBox(
|
||||
constraints: BoxConstraints.loose(Size.fromWidth(400)),
|
||||
child: InkWell(
|
||||
: InkWell(
|
||||
onTap: () => ref
|
||||
.watch(LaunchHelper.provider)
|
||||
.launchUrl(Uri.parse(link)),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue