FormioSubmission class

Represents a Form.io submission envelope or raw submission payload.

In standard Form.io REST conventions, submissions have the format:

{
  "_id": "60a7e...",
  "data": { "firstName": "Alice", "email": "alice@example.com" },
  "metadata": { "timezone": "UTC" },
  "state": "submitted"
}

This class handles both full envelopes and raw data dictionaries.

Annotations

Constructors

FormioSubmission({String? id, String? formId, required Map<String, dynamic> data, Map<String, dynamic> metadata = const {}, String state = 'submitted', DateTime? created, DateTime? modified})
const
FormioSubmission.fromData(Map<String, dynamic> data, {String state = 'submitted'})
Creates a FormioSubmission wrapping a raw form data map.
factory
FormioSubmission.fromJson(Map<String, dynamic> json)
Parses a submission from a Map which might be a full envelope or raw data.
factory

Properties

created → DateTime?
Optional creation or update timestamps.
final
data → Map<String, dynamic>
The submission data payload containing field keys and values.
final
formId → String?
The form identifier, if associated.
final
hashCode → int
The hash code for this object.
no setterinherited
id → String?
The submission identifier, if assigned by server.
final
metadata → Map<String, dynamic>
Optional metadata such as client timezone, referrer, submission timestamp, etc.
final
modified → DateTime?
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
state → String
Submission lifecycle state: usually 'submitted' or 'draft'.
final

Methods

copyWith({String? id, String? formId, Map<String, dynamic>? data, Map<String, dynamic>? metadata, String? state, DateTime? created, DateTime? modified}) → FormioSubmission
Creates a copy with optionally updated fields.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
Serializes as a standard Form.io submission envelope.
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited