MBMessages constructor

MBMessages({
  1. int messagesDelay = 1,
  2. bool automaticallyCheckMessagesAtStartup = true,
  3. bool debug = false,
  4. MBInAppMessageTheme themeForMessage(
    1. BuildContext,
    2. MBInAppMessage
    )?,
  5. dynamic onButtonPressed(
    1. MBInAppMessageButton
    )?,
})

Initializes an instance of MBMessages plugin @param messagesDelay The delayed (in seconds) used to delay the presenting of the message after a successful fetch. By default it's 1 second. @param automaticallyCheckMessagesAtStartup If the plugin should automatically check messages at startup. By default it's true. @param debug Settings this var to true will always display the messages returned by the api, even if they've been already showed. @param themeForMessage A theme used to define and override colors and fonts of in-app messages. @param onButtonPressed Callback called when a button of an in-app message is tapped. Use this to bring you user to the correct screen, based on the button settings.

Implementation

MBMessages({
  this.messagesDelay = 1,
  this.automaticallyCheckMessagesAtStartup = true,
  this.debug = false,
  this.themeForMessage,
  this.onButtonPressed,
}) {
  _pluginStartup();
}