MBAutomation class
The automation plugin of MBurger, you can use this to show in app messages and push notifications based on the behavior of the user.
- Inheritance
-
- Object
- MBPlugin
- MBAutomation
- Mixed in types
Constructors
- MBAutomation({bool trackingEnabled = true, int eventsTimerTime = 10})
-
Initializes the plugin with the parameters passed.
@param trackingEnabled If the tracking is enabled, default to
true
. @param eventsTimerTime The frequency used to send events and view to MBurger (in seconds), default 10.
Properties
- eventsTimerTime ↔ int
-
Returns the frequency used to send events and view to MBurger.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- startupOrder ↔ int
-
The order of startup for this plugin, in MBurger
getter/setter pairoverride
- trackingEnabled ↔ bool
-
If tracking is enabled for this plugin, if this is false all events and views will not be saved and sent to the server.
getter/setter pair
Methods
-
didChangeAccessibilityFeatures(
) → void -
Called when the system changes the set of currently active accessibility
features.
inherited
-
didChangeAppLifecycleState(
AppLifecycleState state) → void -
WidgetBindingsObserver function, when the app is resumed automation checks the triggers in case something has changed.
override
-
didChangeLocales(
List< Locale> ? locales) → void -
Called when the system tells the app that the user's locale has
changed. For example, if the user changes the system language
settings.
inherited
-
didChangeMetrics(
) → void -
Called when the application's dimensions change. For example,
when a phone is rotated.
inherited
-
didChangePlatformBrightness(
) → void -
Called when the platform brightness changes.
inherited
-
didChangeTextScaleFactor(
) → void -
Called when the platform's text scale factor changes.
inherited
-
didHaveMemoryPressure(
) → void -
Called when the system is running low on memory.
inherited
-
didPopRoute(
) → Future< bool> -
Called when the system tells the app to pop the current route, such as
after a system back button press or back gesture.
inherited
-
didPushRoute(
String route) → Future< bool> -
Called when the host tells the application to push a new route onto the
navigator.
inherited
-
didPushRouteInformation(
RouteInformation routeInformation) → Future< bool> -
Called when the host tells the application to push a new
RouteInformation and a restoration state onto the router.
inherited
-
didRequestAppExit(
) → Future< AppExitResponse> -
Called when a request is received from the system to exit the application.
inherited
-
locationDataUpdated(
double latitude, double longitude) → void -
Invoked by the MBurger plugins manager when new location data is available in the
MBAudience
plugin. @param latitude The new latitude. @param longitude: The new longitude.override -
messagesReceived(
List messages, bool fromStartup) → Future< void> -
Invoked by the MBurger plugins manager when new messages are received by the
MBMessages
plugin. This function parse the triggers array, creates triggers objects and updates the saved messages where automation is enabled. @param messages The messages received, the triggers property will be populated with aMBTrigger
object. @param fromStartup If messages has been retrieved at app startupoverride -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
startupBlock(
) → Future< void> -
The function run at startup by MBurger, initializes the plugin and do the startup work.
It start the timer to check and send events and views to the server.
override
-
tagChanged(
String tag, {String? value}) → void -
Invoked by the MBurger plugins manager when a tag changes in the
MBAudience
plugin. @param tag The tag. @param value: The value of the tag,null
if the tag has been deleted.override -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
sendEvent(
String event, {String? name, Map< String, dynamic> ? metadata}) → Future<void> - Send and event with automation @param event The event. @param name The name of the event that will be displayed on MBurger dashboard @param metadata Additional metadata sent with the event
-
trackScreenView(
String view, {Map< String, dynamic> ? metadata}) → Future<void> - Tracks a screen view manually. @param view The name of the view. @param metadata Optional metadata associated with the view.