Skip to content

url_launcher does not work for flutter web #44012

@c-p-i-o

Description

@c-p-i-o

I was working on a package
https://pub.dev/packages/oauth2
This oauth2 package is marked web on pub.dev
However, this package uses url_launcher, and url_launcher does not work with web
If you look at the oauth2 package and attempt to run the example via
flutter run -d chrome,
You'll see that the code hangs in the canLaunch(url) code in lib/oauth.dart

    if (await canLaunch(url)) {
      await launch(url);
    } else {
      throw 'Could not launch $url';
    }
  }

The function never returns.

Metadata

Metadata

Assignees

No one assigned

    Labels

    p: url_launcherPlugin to launch external applicationspackageflutter/packages repository. See also p: labels.platform-webWeb applications specifically

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions