MBAudienceManager class Null safety

Main singleton that manages the state of MBAudience and communication with MBurger APIs.

Inheritance

Properties

hashCode int
The hash code for this object.
read-onlyinherited
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited

Methods

currentSession() Future<int>
The current session retrieved from the `MBAudienceSessionManager class. @returns The current session number.
didChangeAccessibilityFeatures() → void
Called when the system changes the set of currently active accessibility features.
inherited
didChangeAppLifecycleState(AppLifecycleState state) → void
Function called when the app changes the lifecycle state. @param state The new app state.
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. For example, on Android, this is called when the user presses the back button.
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
getCustomId() Future<String?>
The custom id in the MBAudienceIdsManager instance. @returns a Future that completes with the saved custom id.
getMobileUserId() Future<int?>
The current saved mobile user id in the MBAudienceIdsManager instance. @returns a Future that completes with the current saved mobile user id.
increaseSession() Future<void>
Increases the session using the `MBAudienceSessionManager class.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
removeCustomId() Future<void>
Removes the custom id in the MBAudienceIdsManager instance.
removeMobileUserId() Future<void>
Removes the mobile user in the MBAudienceIdsManager instance.
removeTag(String tag) Future<void>
Removes the tag with the specified key in the MBAudienceTagsManager instance. @param tag The tag that needs to be removed.
removeTags(List<String> tags) Future<void>
Removes an array of tags in the MBAudienceTagsManager instance. @param tags An array of tags that will be removed.
setCurrentLocation(double latitude, double longitude) Future<void>
Sets the current location and updates MBAudience data if the distance is > 100m from the last location @param latitude The new latitude. @param longitude The new longitude.
setCustomId(String customId) Future<void>
Set a custom id in the MBAudienceIdsManager instance. @param customId The custom id.
setMobileUserId(int mobileUserId) Future<void>
Set the mobile user id in the MBAudienceIdsManager instance. @param mobileUserId The mobile user id.
setTag({required dynamic tag, required dynamic value}) Future<void>
Sets a tag in the MBAudienceTagsManager instance. @param tag The tag. @param value The value of the tag.
setTags({required Map<String, String> tags}) Future<void>
Sets n tags in the MBAudienceTagsManager instance. @param tags a map of tags and values.
startSessionDateForSession(int session) Future<DateTime?>
The date of start of a session. @param session The index of the session. @return The date when the session with the index has started, if no session is found this function returns null.
toString() String
A string representation of this object.
inherited
updateMetadata() Future<void>
Function to update the data in MBurger.

Operators

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

Static Properties

shared MBAudienceManager
The singleton that manages all the data sent and received to/from MBurger.
read-only