Loglytics<D extends Analytics> mixin
Used to provide all logging, analytics and crashlytics functionality to a class of your choosing.
If you want to make use of the analytic functionality use Loglytics.setUp to provide your implementations of the AnalyticsInterface and CrashReportsInterface. After doing so you can add the Loglytics mixin to any class where you would like to add logging and/or analytics to. In order to have access to the appropriate Analytics implementation for a specific feature or part of your project you should add the implementation as generic arguments to a Loglytics like Loglytics
Defining the generic Analytics is optional however as the Loglytics will also work without
it. When no generic is specified you can even use our basic analytic functionality through the
default Analytics.core
getter that's accessible through Loglytics.analytics.
Properties
- analytics → D
-
Provides the configured Analytics functionality through the Loglytics mixin per type of
D
.latefinal - hashCode → int
-
The hash code for this object.
no setterinherited
- location → String
-
Used to define the location of Loglytics logging and implementation.
no setter
- log → Log
-
Used to provide all logging capabilities.
latefinal
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
analyticsAs<
A extends Analytics> () → A -
Provides the configured Analytics functionality through the Loglytics mixin per type of
A
. -
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 Methods
-
create<
T extends Analytics> ({required String location}) → Loglytics< T> -
disposeMe(
) → Future< void> - Used to configure the logging and analytic abilities of the Loglytics.
-
getAnalytics<
E extends Analytics> ({String? location}) → E -
Provides any registered Analytics object per generic argument of
E
. -
registerAnalytics(
{required void analytics(AnalyticsFactory analyticsFactory), bool registerDefaultAnalytics = true}) → void - Used to register analytics objects, default to .
-
resetAnalytics(
) → Future< void> - Used to reset analytics objects.
-
setUp(
{bool logTime = false, LogLevel logLevel = LogLevel.info, AnalyticsInterface? analyticsInterface, CrashReportsInterface? crashReportsInterface, void analytics(AnalyticsFactory analyticsFactory)?, int? maxLinesStackTrace, bool combineEvents = true, bool addAnalyticsToCrashReports = true, CrashReportType crashReportType = CrashReportType.location}) → void - Used to configure the logging and analytic abilities of the Loglytics.