AppmetricaSdk class
Appmetrica SDK singleton.
Constructors
- AppmetricaSdk.new()
-
factory
- AppmetricaSdk.private(MethodChannel _channel)
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
-
activate(
{required String apiKey, int sessionTimeout = 10, bool locationTracking = true, bool statisticsSending = true, bool crashReporting = true, int maxReportsInDatabaseCount = 1000}) → Future< void> - Initializes the library in an application with given parameters.
-
getLibraryVersion(
) → Future< String?> - Returns the current version of the AppMetrica library.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
reportEvent(
{required String name, Map< String, dynamic> ? attributes}) → Future<void> -
Sends an event with
name
and message as a set ofattributes
to the AppMetrica server. -
reportReferralUrl(
{required String referral}) → Future< void> -
reportUserProfileCustomBoolean(
{required String key, bool? value}) → Future< void> -
Sends custom boolean user profile attribute with the given
key
andvalue
to the AppMetrica server. -
reportUserProfileCustomCounter(
{required String key, required double delta}) → Future< void> -
Sends custom counter user profile attribute with the given
key
andvalue
to the AppMetrica server. -
reportUserProfileCustomNumber(
{required String key, double? value}) → Future< void> -
Sends custom number user profile attribute with the given
key
andvalue
to the AppMetrica server. -
reportUserProfileCustomString(
{required String key, String? value}) → Future< void> -
Sends custom string user profile attribute with the given
key
andvalue
to the AppMetrica server. -
reportUserProfileNotificationsEnabled(
{bool? notificationsEnabled}) → Future< void> -
Sends predefined
notificationsEnabled
profile attribute to the AppMetrica server. -
reportUserProfileUserName(
{String? userName}) → Future< void> -
Sends predefined
userName
profile attribute to the AppMetrica server. -
sendEventsBuffer(
) → Future< void> - Sends stored events from the buffer. AppMetrica SDK does not send an event immediately after it occurred. The library stores event data in the buffer. The sendEventsBuffer() method sends data from the buffer and flushes it. Use the method to force sending stored events after passing important checkpoints of user scenarios.
-
setStatisticsSending(
{required bool statisticsSending}) → Future< void> - Disable and enable sending statistics to the AppMetrica server.
-
setUserProfileID(
{required String userProfileID}) → Future< void> - Sets the ID of the user profile. Required for predefined profile attributes like Name or Notifications enabled.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited