Simplytics class abstract
The main Simplytics class that allows you to configure analytics and error monitoring services and gives access to them through properties.
Before use, you must configure using the setup method:
Simplytics.setup(
analyticsService: YourAnalyticsService(),
crashlogService: YourCrashReportingService(),
);
After that, you can use it anywhere in your code:
// Analytics
Simplytics.analytics.logEvent(name: 'your_event');
// Error reporting
Simplytics.crashlog.recordError('Some error', StackTrace.current);
See also:
- Simplytics.setup - to set up analytics and error monitoring services;
- Simplytics.analytics - analytics service instance;
- Simplytics.crashlog - error monitoring service instance.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- analytics → SimplyticsAnalyticsInterface
-
A reference to an instance of an analytics object that gives access to methods for
sending events, setting a user id, etc.
no setter
- crashlog → SimplyticsCrashlogInterface
-
A reference to an instance of the error monitoring object, giving access to methods for
sending error reports, etc.
no setter
Static Methods
-
setup(
{SimplyticsAnalyticsInterface? analyticsService, SimplyticsCrashlogInterface? crashlogService}) → void - Set up analytics and error monitoring object instances. Must be called before sending events to analytics and error reporting.