InlineInAppMessageView class

A Flutter widget that displays an inline in-app message using native platform views.

This widget wraps the native Android InlineInAppMessageView and iOS InlineMessageUIView and provides Flutter integration. The view will automatically show and hide based on whether there are messages available for the specified element ID. When no message is available, the widget is hidden using the Offstage widget to prevent layout issues.

Example usage:

InlineInAppMessageView(
  elementId: 'banner-message',
  onActionClick: (message, actionValue, actionName) {
    print('Action clicked: $actionName with value: $actionValue');
    print('Message ID: ${message.messageId}');
  },
)
Inheritance

Constructors

InlineInAppMessageView({Key? key, required String elementId, InAppMessageActionClickCallback? onActionClick})
Creates an inline in-app message view.
const

Properties

elementId String
The element ID that identifies which message to display
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onActionClick InAppMessageActionClickCallback?
Callback function that gets called when a message action is clicked
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<InlineInAppMessageView>
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

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