onDiagnostic property
Called when the hosted checkout emits a runtime diagnostic.
This covers malformed hosted messages, blocked unsafe navigations, WebView resource failures, and JavaScript console warnings/errors from the hosted page.
It also covers the frame check on hosted messages. message_rejected
means a message did not come from the Crossmint checkout page itself,
for example from an iframe inside it, so checkout ignored it. The details
give its origin, never its content. frame_check_unavailable means this
WebView cannot tell frames apart, so checkout accepts messages from every
frame. message_channel_failed means the message channel did not open,
so checkout cannot receive events.
Implementation
final void Function(CrossmintCheckoutDiagnostic diagnostic)? onDiagnostic;