In-App Messaging
This section provides API reference details for the In-App Messaging module in the Flutter unified plugin.
Registers a handler that decides whether the SDK should display an in-app message. This handler gives the app the final say over the native shouldShowMessage or shouldShow delegate.
| Parameter | Type | Description |
|---|---|---|
handler | InAppMessageDecisionHandler? | Invoked with the full InAppMessage to decide whether it should display. Return or complete with true to display the message, false to suppress it. Pass null to clear the handler and restore default SDK behavior, where every message shows immediately. |
Future<void>
Displays a specific in-app message by its identifier.
| Parameter | Type | Description |
|---|---|---|
id | String | The identifier of the in-app message to display. If this value is blank or null, the API rejects the request. |
Future<void>
A broadcast stream of in-app message lifecycle events (shouldShow, didShow, didClose).
Stream<InAppMessageEvent>- Emits anInAppMessageEventeach time an in-app message’s lifecycle phase changes.
Sets the font used to render in-app messages.
| Parameter | Type | Description |
|---|---|---|
fontName | String? | The font name to apply. In Android, the name is resolved with Typeface.create. In iOS, it’s the PostScript name passed to setInAppMessageFont. Pass null to revert to the system default font. |
Future<void>
Sets the status bar color of the in-app message activity. Only Android apps support this capability.
| Parameter | Type | Description |
|---|---|---|
colorArgb | int | A 32-bit ARGB color value, such as 0xFF0000FF. |
Future<void>