setup static method
void
setup({
- SimplyticsAnalyticsInterface? analyticsService,
- SimplyticsCrashlogInterface? crashlogService,
Set up analytics and error monitoring object instances. Must be called before sending events to analytics and error reporting.
You can set up only one service, for example only the error monitoring service, if you do not need analytics.
It is possible to configure several services of the same type at once using a group class, for example:
Simplytics.setup(
crashlogService: SimplyticsCrashlogServiceGroup([
SimplyticsDebugCrashlogService(),
CustomCrashReportingService(),
]),
);
See also:
- SimplyticsAnalyticsServiceGroup - for grouping analytics services;
- SimplyticsCrashlogServiceGroup - for grouping error monitoring services.
Implementation
static void setup({
SimplyticsAnalyticsInterface? analyticsService,
SimplyticsCrashlogInterface? crashlogService,
}) {
if (analyticsService != null) {
_analytics = analyticsService;
}
if (crashlogService != null) {
_crashlog = crashlogService;
}
}