chore: Minor code clean up

This commit is contained in:
Krille 2023-05-15 18:55:27 +02:00
commit cb0fe173d9
7 changed files with 24 additions and 12 deletions

View file

@ -260,7 +260,10 @@ class MessageContent extends StatelessWidget {
decoration: TextDecoration.underline,
decorationColor: textColor.withAlpha(150),
),
onLinkTap: (url) => UrlLauncher(context, url).launchUrl(),
beforeLaunch: (url) {
UrlLauncher(context, url.toString()).launchUrl();
return false;
},
);
},
);

View file

@ -126,8 +126,10 @@ class PinnedEvents extends StatelessWidget {
decorationColor:
Theme.of(context).colorScheme.onSurfaceVariant,
),
onLinkTap: (url) =>
UrlLauncher(context, url).launchUrl(),
beforeLaunch: (url) {
UrlLauncher(context, url.toString()).launchUrl();
return false;
},
);
},
),