StreamAnalytics constructor
StreamAnalytics(
- String apiKey, {
- String? secret,
- Token? userToken,
- AnalyticsAPI? analytics,
- StreamHttpClientOptions? options,
StreamAnalytics constructor:
Sends out analytic events to the Stream service. We recommend tracking every event for each user. This allows you to gain a better understanding of that user's interests. Common examples include:
- Clicking on a link
- Liking or commenting
- Sharing an activity
- Viewing another user's profile page
- Searching for a certain user/content/topic/etc.
Implementation
StreamAnalytics(
String apiKey, {
this.secret,
this.userToken,
AnalyticsAPI? analytics,
StreamHttpClientOptions? options,
}) : assert(
userToken != null || secret != null,
'At least a secret or userToken must be provided',
),
_analytics = analytics ?? AnalyticsAPI(apiKey, options: options);