Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

examples and API doco out of date #112

Open
abulka opened this issue Oct 26, 2022 · 0 comments
Open

examples and API doco out of date #112

abulka opened this issue Oct 26, 2022 · 0 comments

Comments

@abulka
Copy link

abulka commented Oct 26, 2022

I installed 5.0.2 and the readme examples and API doco uses deprecated calls canLaunch and launch. E.g. the example

Future<void> _onOpen(LinkableElement link) async {
  if (await canLaunch(link.url)) {
    await launch(link.url);
  } else {
    throw 'Could not launch $link';
  }
}

should be something like:

Future<void> _onOpen(LinkableElement link) async {
  final Uri url = Uri.parse(link.url);
  if (await canLaunchUrl(url)) {
    await launchUrl(url);
  } else {
    throw 'Could not launch $link';
  }
}

This is pretty confusing for newcomers to this project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant