How do I send an email through a Contact Form using Flutter Web?

Issue

So I want users to be able to fill the form and send an email like the typical website Contact forms we have.

I have tried several libraries on pub dev, but non seems to do the job right, most only focus on IOS and Android.

Solution

Use this Plugin

pubspec.yaml

dependencies:
  url_launcher: ^5.7.1

import

import 'package:url_launcher/url_launcher.dart';

to launch

_launchURL() async {
  const url = 'https://flutter.dev';
  if (await canLaunch(url)) {
    await launch(url);
  } else {
    throw 'Could not launch $url';
  }
}

URL schemes

enter image description here

Answered By – M123

Answer Checked By – Jay B. (FlutterFixes Admin)

Leave a Reply

Your email address will not be published.