MethodChannelFirebaseAnalytics class
The method channel implementation of FirebaseAnalyticsPlatform.
- Inheritance
-
- Object
- PlatformInterface
- FirebaseAnalyticsPlatform
- MethodChannelFirebaseAnalytics
Constructors
- MethodChannelFirebaseAnalytics({required FirebaseApp app})
-
Creates a new MethodChannelFirebaseAnalytics instance with an
app
and/orregion
.
Properties
- app → FirebaseApp
-
Returns the
FirebaseApp
for the current instance.no setterinherited - appInstance ↔ FirebaseApp?
-
The
FirebaseApp
this instance was initialized with.getter/setter pairinherited - hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
delegateFor(
{required FirebaseApp app}) → FirebaseAnalyticsPlatform -
Enables delegates to create new instances of themselves
override
-
getAppInstanceId(
) → Future< String?> -
Retrieves the app instance id from the service.
override
-
getSessionId(
) → Future< int?> -
override
-
initiateOnDeviceConversionMeasurement(
{String? emailAddress, String? phoneNumber}) → Future< void> -
Used for ads conversion measurement, without allowing any personally identifiable information to leave the user device.
override
-
isSupported(
) → Future< bool> -
Returns "true" as this API is used to inform users of web browser support
override
-
logEvent(
{required String name, Map< String, Object?> ? parameters, AnalyticsCallOptions? callOptions}) → Future<void> -
Logs a custom Flutter Analytics event with the given
name
and eventparameters
.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
resetAnalyticsData(
) → Future< void> -
Clears all analytics data for this app from the device and resets the app
instance id.
override
-
setAnalyticsCollectionEnabled(
bool enabled) → Future< void> -
Sets whether analytics collection is enabled for this app.
override
-
setConsent(
{bool? adStorageConsentGranted, bool? analyticsStorageConsentGranted, bool? adPersonalizationSignalsConsentGranted, bool? adUserDataConsentGranted, bool? functionalityStorageConsentGranted, bool? personalizationStorageConsentGranted, bool? securityStorageConsentGranted}) → Future< void> -
Sets the applicable end user consent state.
By default, no consent mode values are set.
override
-
setCurrentScreen(
{String? screenName, String? screenClassOverride, AnalyticsCallOptions? callOptions}) → Future< void> -
Sets the current screen name, which specifies the current visual context
in your app.
override
-
setDefaultEventParameters(
Map< String, Object?> ? defaultParameters) → Future<void> -
Adds parameters that will be set on every event logged from the SDK, including automatic ones.
override
-
setSessionTimeoutDuration(
Duration timeout) → Future< void> -
Sets the duration of inactivity that terminates the current session.
override
-
setUserId(
{String? id, AnalyticsCallOptions? callOptions}) → Future< void> -
Sets the user id.
Setting a null
id
removes the user id.callOptions
are for web platform only.override -
setUserProperty(
{required String name, required String? value, AnalyticsCallOptions? callOptions}) → Future< void> -
Sets a user property to the given value.
Setting a null
value
removes the user property.callOptions
are for web platform only.override -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance → MethodChannelFirebaseAnalytics
-
Returns a stub instance to allow the platform interface to access
the class instance statically.
no setter
Constants
- channel → const MethodChannel