toJson method
Converts the AfterSubmitAction to a JSON.
Implementation
Map<String, dynamic> toJson() {
return {
'action': type.name,
if (buttonTitle != null) 'buttonTitle': buttonTitle,
if (trigger != null) 'trigger': trigger!.name,
if (delay != null) 'delay': delay!.inSeconds,
if (targetUrl != null) 'targetUrl': targetUrl!.toString(),
};
}