MBAudienceManager class
Main singleton that manages the state of MBAudience and communication with MBurger APIs.
- Inheritance
-
- Object
- WidgetsBindingObserver
- MBAudienceManager
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
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
-
didChangeViewFocus(
ViewFocusEvent event) → void -
Called whenever the PlatformDispatcher receives a notification that the
focus state on a view has changed.
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
-
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. -
handleCancelBackGesture(
) → void -
Called when a predictive back gesture is canceled, indicating that no
navigation should occur.
inherited
-
handleCommitBackGesture(
) → void -
Called when a predictive back gesture is finished successfully, indicating
that the current route should be popped.
inherited
-
handleStartBackGesture(
PredictiveBackEvent backEvent) → bool -
Called at the start of a predictive back gesture.
inherited
-
handleUpdateBackGestureProgress(
PredictiveBackEvent backEvent) → void -
Called when a predictive back gesture moves.
inherited
-
increaseSession(
) → Future< void> - Increases the session using the `MBAudienceSessionManager class.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent 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
-
The singleton that manages all the data sent and received to/from MBurger.
no setter