toJson method
Implementation
Map<String, dynamic> toJson() => {
'filter': filter?.toJson(),
'title_text_color': titleTextColor?.hex,
'prompt_text_color': promptTextColor?.hex,
'close_button_tint_color': closeButtonTintColor?.hex,
if (closeButtonImage != null) 'close_button_image': base64.encode(encodePng(closeButtonImage!)),
'title': title,
'font': fontPath,
if (logoImage != null) 'logo_image': base64.encode(encodePng(logoImage!)),
'prompt_background_color': promptBackgroundColor?.hex,
'prompt_rounded_corners': promptRoundedCorners,
'surround_color': surroundColor?.hex,
'certificates': certificates,
'timeout': timeout?.inSeconds,
'enable_screenshots': enableScreenshots,
'orientation': orientation?.stringValue,
'camera': camera?.stringValue,
'header_background_color': headerBackgroundColor?.hex,
'disable_exterior_effects': disableExteriorEffects,
'genuine_presence_assurance': genuinePresenceAssurance?.toJson(),
'liveness_assurance': livenessAssurance?.toJson(),
}._withoutNullValues();