GA4Provider class
Stub GA4 provider for non-web platforms — does nothing.
- Inheritance
-
- Object
- AnalyticsProvider
- GA4Provider
Constructors
-
GA4Provider({required String measurementId, bool sendPageViewOnInit = false, Map<
String, dynamic> ? defaultParameters})
Properties
-
defaultParameters
→ Map<
String, dynamic> ? -
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- measurementId → String
-
final
- name → String
-
Human-readable name of this provider
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sendPageViewOnInit → bool
-
final
Methods
-
dispose(
) → void -
Cleanup resources
override
-
initialize(
) → void -
Initialize the provider (inject scripts, etc.)
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setUserProperties(
Map< String, dynamic> properties) → void -
Set user properties
override
-
toString(
) → String -
A string representation of this object.
inherited
-
trackEvent(
{required String name, Map< String, dynamic> ? parameters}) → void -
Track a custom event
override
-
trackPageView(
{required String path, String? title, Map< String, dynamic> ? parameters}) → void -
Track a page view
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited