Constructors
Analytics ({required DashTool tool , required String dartVersion , String ? flutterChannel , String ? flutterVersion , bool enableAsserts = false })
The default factory constructor that will return an implementation
of the Analytics abstract class using the LocalFileSystem
factory
Analytics.development ({required DashTool tool , required String dartVersion , String ? flutterChannel , String ? flutterVersion , bool enableAsserts = true })
Factory constructor to return the AnalyticsImpl
class with
Google Analytics credentials that point to a test instance and
not the production instance where live data will be sent
factory
Analytics.test ({required DashTool tool , required Directory homeDirectory , required String measurementId , required String apiSecret , String ? flutterChannel , String ? flutterVersion , required String dartVersion , int toolsMessageVersion = kToolsMessageVersion , String toolsMessage = kToolsMessage , required FileSystem fs , required DevicePlatform platform , GAClient? gaClient })
Factory constructor to return the AnalyticsImpl
class with a
MemoryFileSystem
to use for testing
factory
Properties
getConsentMessage
→ String
Retrieves the consent message to prompt users with on first
run or when the message has been updated
no setter
hashCode
→ int
The hash code for this object.
no setter inherited
okToSend
→ bool
Returns true if it is OK to send an analytics message. Do not cache,
as this depends on factors that can change, such as the configuration
file contents.
no setter
parsedTools
→ Map <String , ToolInfo >
Returns a map object with all of the tools that have been parsed
out of the configuration file
no setter
runtimeType
→ Type
A representation of the runtime type of the object.
no setter inherited
shouldShowMessage
→ bool
Boolean that lets the client know if they should display the message
no setter
telemetryEnabled
→ bool
Boolean indicating whether or not telemetry is enabled
no setter
userPropertyMap
→ Map <String , Map <String , Object ? > >
Returns a map representation of the UserProperty
for the Analytics
instance.
no setter
Methods
clientShowedMessage ()
→ void
Method to be invoked by the client using this package to confirm
that the client has shown the message and that it can be added to
the config file and start sending events the next time it starts up
close ()
→ void
Call this method when the tool using this package is closed
logFileStats ()
→ LogFileStats ?
Query the persisted event data stored on the user's machine
noSuchMethod (Invocation invocation )
→ dynamic
Invoked when a nonexistent method or property is accessed.
inherited
send (Event event )
→ Future <Response > ?
Send preconfigured events using specific named constructors
on the Event class
setTelemetry (bool reportingBool )
→ Future <void >
Pass a boolean to either enable or disable telemetry and make
the necessary changes in the persisted configuration file
toString ()
→ String
A string representation of this object.
inherited