MuxForms on Flutter sends an HTTP POST from your contact screen to /api/v1/forms/{id}/submit with Content-Type application/json and the ingest secret header. No Flutter plugin required.
Docs
Flutter apps use package:http (or dio) to POST the same JSON field names you defined in the MuxForms dashboard.
| Piece | Detail |
|---|---|
| package:http | POST JSON |
| Field names | Match schema |
| Secret | flutter_dotenv or backend |
| 422 | Decode errors map to TextFormField |
import 'dart:convert';
import 'package:http/http.dart' as http;
Future<void> submitContact({required String email, required String message}) async {
const formId = 'FORM_UUID';
const secret = String.fromEnvironment('MUXFORMS_INGEST_SECRET');
final uri = Uri.parse('https://www.muxforms.com/api/v1/forms/$formId/submit');
final res = await http.post(
uri,
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer $secret',
},
body: jsonEncode({
'email': email,
'message': message,
'platform': 'flutter',
'_hp': '',
}),
);
if (res.statusCode != 200) {
throw Exception('Submit failed: ${res.statusCode}');
}
}Map TextEditingController values to schema keys.
Upgrade to Pro