2

I want to open the system's email program from the browser and I do this by calling

TextSpan(
    text: 'support@company.de',
    style: Theme.of(context).textTheme.bodyMedium!.copyWith(
         color: Theme.of(context).primaryColor,
         fontWeight: FontWeight.bold,
    ),
    recognizer: TapGestureRecognizer()
                    ..onTap = () async {
                      await launchUrl(
                        Uri(
                          scheme: 'mailto',
                          path: 'support@company.de',
                        ),
                      );
                    })

When I test the code locally (also with --release builds) everything works fine but as soon as I deploy the app to firebase hosting it returns an

Uncaught Error: MissingPluginException(No implementation found for method launch on channel plugins.flutter.io/url_launcher)

What's the difference between my local release builds and the one I upload to firebase hosting? Why does it suddenly give me this MissingPluginException?

luckyhandler
  • 10,651
  • 3
  • 47
  • 64

1 Answers1

0

I encountered the same problem. Adding url_launcher_web as a dependency in my pubspec file solved the issue for me. flutter pub add url_launcher_web

Salpers
  • 1
  • 2