mb_contact_form 1.1.3 copy "mb_contact_form: ^1.1.3" to clipboard
mb_contact_form: ^1.1.3 copied to clipboard

A plug-and-play Flutter contact form widget with name, email, and message fields, built-in validation, and native mail app integration.

mb_contact_form #

A plug-and-play contact form widget for Flutter — name, email, and message with built-in validation.

pub version pub points license flutter

Drop-in contact form with name, email, and message fields. Validates input and opens the device mail app with a pre-filled message on submit — no backend required.


Features #

✦ Name, email, and message fields with built-in validation
✦ Opens native mail app on submit — no backend or API keys needed
✦ Optional icons on each field
✦ Optional "Contact Form" heading
✦ Works on Android, iOS, web, and desktop

Installation #

Add to your pubspec.yaml:

dependencies:
  mb_contact_form: ^1.0.2

Then run:

flutter pub get

Usage #

import 'package:mb_contact_form/mb_contact_form.dart';

MBContactForm(
  destinationEmail: 'you@example.com',
  withIcons: true,
  hasHeading: true,
)

Place it anywhere in your widget tree — inside a Scaffold, a Column, a modal sheet, wherever fits.


Parameters #

Parameter Type Default Description
destinationEmail String required Email address that receives the submitted message
withIcons bool required Show icons next to each field
hasHeading bool true Show "Contact Form" heading at the top of the card

How It Works #

When the user taps Submit:

  1. All fields are validated — name (first + last), email format, non-empty message.
  2. A mailto: URI is built with subject Feedback from <name> and the body set to the message.
  3. The device's default mail app opens with everything pre-filled.
user fills form → taps Submit → validation passes
    └── mailto: URI constructed
            └── native mail app opens, pre-filled ✅

Contributing #

Contributions are welcome! Please follow the conventional commits format when committing.


Made with 🎯 by @moulibheemaneti
MIT License

5
likes
150
points
145
downloads

Documentation

API reference

Publisher

verified publishermoulibheemaneti.com

Weekly Downloads

A plug-and-play Flutter contact form widget with name, email, and message fields, built-in validation, and native mail app integration.

Repository (GitHub)
View/report issues
Contributing

Topics

#contact-form #flutter #form #email #ui

License

MIT (license)

Dependencies

flutter, mb_button, url_launcher

More

Packages that depend on mb_contact_form