countly_flutter_lite 26.1.0
countly_flutter_lite: ^26.1.0 copied to clipboard
Lightweight and stable Flutter SDK for simple analytics integration.
26.1.0 #
-
Initial SDK release with the following functionalities:
-
Initialization:
Countly.init(config)- Initialize the SDK with configurationCountly.defaultInstance- Access the default SDK instanceCountly.instance(key)- Access a specific SDK instance by keyCountly.disposeInstance(key)- Dispose a specific SDK instanceCountly.disposeAll()- Dispose all SDK instances- Multi-instance support with unique instance keys
-
Configuration Options (CountlyConfig)
appKey(required) - Application keyserverUrl(required) - Server URL (http:// or https://)deviceId- Custom device ID (auto-generated if not provided)userProperties- Initial user properties to setstorageMode- Storage mode (persistent or memory)storageMethods- Custom storage implementationstartWithUnknownConsent- Start in unknown consent modegiveConsent- Grant consent at initializationlogLevel- Logging verbosity level (error, warning, info, debug, verbose)logger- Custom logger implementation (SdkLogger interface)enableSDKLogs- Enable SDK internal loggingenableVisualWarnings- Show visual warnings (toasts) for SDK errors/warningscustomRequestHeaders- Custom HTTP headers for requestsdeviceMetricOverrides- Override collected device metricssbs- Initial SDK Behavior SettingsdisableOldDataMigration- Disable migration from legacy native SDKs
-
Events Module (sdk.events)
record(key, count, sum, dur, segmentation)- Record custom events with optional parametersrecordMetrics(metricOverride)- Record device metrics with optional overrides- Segmentation support for strings, numbers, booleans, and lists
-
Views Module (sdk.views)
startAutoStoppedView(viewName, {segmentation})- Start an auto-stopped viewendActiveView({segmentation})- End the currently active view- Automatic view duration tracking with heartbeat mechanism
- View state recovery after app restart
-
Users Module (sdk.users)
setProperties(props)- Set user properties (named and custom)pushToArray(key, values)- Add values to array property (allows duplicates)addToSet(key, values)- Add unique values to array propertypullFromArray(key, values)- Remove values from array property- Named properties: name, username, email, organization, phone, picture, gender, byear
-
Consents Module (sdk.consents)
giveConsent()- Grant consent for data collectionrevokeConsent()- Revoke consent and clear data- Unknown consent state support
-
Device ID Module (sdk.id)
changeWithMerge(newDeviceId)- Change device ID with server-side mergechangeWithoutMerge(newDeviceId)- Change device ID without merge (new user)deviceId- Read-only access to current device IDdeviceIdType- Read-only access to device ID type (provided/generated)
-
SDK Behavior Settings (SBS)
- Server-side configuration support
- Automatic SBS fetching and caching
- Queue size limits (event/request queues)
- Key/value length limits
- Tracking control (global, events, views)
- Event blacklist/whitelist filtering
- User properties blacklist/whitelist filtering
- Segmentation blacklist/whitelist filtering
- Event-specific segmentation filtering
-
Storage
- Persistent storage support (SharedPreferences)
- Memory-only storage mode
- Custom storage methods override
- Legacy native SDK data migration (Android/iOS)
-
Networking
- Automatic request queuing and retry
- Request backoff mechanism
- Custom HTTP headers support
- Health check reporting
-
Logging
- Configurable log levels
- Custom logger implementation support
- Visual warnings (toasts) on Flutter