IForeventsAPIIntegration class
IForevents API Integration for Flutter
A comprehensive integration for the IForevents API that supports:
- User identification and user management
- Individual event tracking
- Batch event processing (recommended)
- Customizable configuration
- Offline event queuing
- Error handling and retry logic
This class implements a singleton pattern to ensure user state persistence across the application lifecycle.
Usage:
final integration = IForeventsAPIIntegration(config: config);
await integration.init();
// Or using the static getter
final integration = IForeventsAPIIntegration.instance;
- Inheritance
-
- Object
- Integration
- IForeventsAPIIntegration
Constructors
- IForeventsAPIIntegration({required IForeventsAPIConfig config})
-
factory
Properties
- config → IForeventsAPIConfig
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isIdentified → bool
-
Whether a user has been identified
no setter
- isInitialized → bool
-
Whether the integration has been initialized
no setter
- onIdentify → void Function(IdentifyEvent event)?
-
finalinherited
- onInit → void Function()?
-
finalinherited
- onPageView → void Function(PageViewEvent event)?
-
finalinherited
- onReset → void Function()?
-
finalinherited
- onTrack → void Function(TrackEvent event)?
-
finalinherited
- queuedEventsCount → int
-
Number of events currently queued
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- userUUID → String?
-
User UUID from the last identify call
no setter
Methods
-
clearStoredUserUUID(
) → Future< void> - Clear the stored userUUID from local storage
-
dispose(
) → void -
flush(
) → Future< void> - Manually flush all queued events
-
getQueueStatus(
) → IForeventsQueueStatus - Get current queue status
-
getStoredUserUUID(
) → String? - Get the userUUID stored in local storage (if any)
-
identify(
{required IdentifyEvent event}) → Future< void> -
override
-
init(
) → Future< void> -
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pageView(
{required PageViewEvent event}) → Future< void> -
override
-
reset(
) → Future< void> -
override
-
toString(
) → String -
A string representation of this object.
inherited
-
track(
{required TrackEvent event}) → Future< void> -
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance → IForeventsAPIIntegration?
-
no setter
Static Methods
-
getInstance(
{required IForeventsAPIConfig config}) → IForeventsAPIIntegration - Get or create the singleton instance
-
resetSingleton(
) → void - Reset the singleton instance completely This will create a new instance on the next factory call