Cahnge `urlLauncher` to `linkLauncher`
This commit is contained in:
parent
383d194f51
commit
f02a54a2f8
|
@ -8,7 +8,7 @@ import 'pages/instance.dart';
|
||||||
import 'pages/user.dart';
|
import 'pages/user.dart';
|
||||||
import 'stores/accounts_store.dart';
|
import 'stores/accounts_store.dart';
|
||||||
|
|
||||||
Future<void> urlLauncher({
|
Future<void> linkLauncher({
|
||||||
@required BuildContext context,
|
@required BuildContext context,
|
||||||
@required String url,
|
@required String url,
|
||||||
@required String instanceUrl,
|
@required String instanceUrl,
|
||||||
|
|
|
@ -16,7 +16,7 @@ class MarkdownText extends StatelessWidget {
|
||||||
data: text,
|
data: text,
|
||||||
extensionSet: md.ExtensionSet.gitHubWeb,
|
extensionSet: md.ExtensionSet.gitHubWeb,
|
||||||
onTapLink: (href) {
|
onTapLink: (href) {
|
||||||
urlLauncher(context: context, url: href, instanceUrl: instanceUrl)
|
linkLauncher(context: context, url: href, instanceUrl: instanceUrl)
|
||||||
.catchError((e) => Scaffold.of(context).showSnackBar(SnackBar(
|
.catchError((e) => Scaffold.of(context).showSnackBar(SnackBar(
|
||||||
content: Row(
|
content: Row(
|
||||||
children: [
|
children: [
|
||||||
|
|
|
@ -145,7 +145,7 @@ class Post extends StatelessWidget {
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final theme = Theme.of(context);
|
final theme = Theme.of(context);
|
||||||
void _openLink() =>
|
void _openLink() =>
|
||||||
urlLauncher(context: context, url: post.url, instanceUrl: instanceUrl);
|
linkLauncher(context: context, url: post.url, instanceUrl: instanceUrl);
|
||||||
|
|
||||||
final urlDomain = () {
|
final urlDomain = () {
|
||||||
if (post.url == null) return null;
|
if (post.url == null) return null;
|
||||||
|
|
Loading…
Reference in New Issue