EmbracePlatform class abstract
The interface that implementations of embrace must implement.
Platform implementations should extend this class
rather than implement it as EmbracePlatform.
Extending this class (using extends) ensures that the subclass will get
the default implementation, while platform implementations that implements
this interface will be broken by newly added EmbracePlatform methods.
- Inheritance
-
- Object
- PlatformInterface
- EmbracePlatform
- Implementers
Constructors
- EmbracePlatform()
- Constructs a EmbracePlatform.
Properties
Methods
-
addBreadcrumb(
String message) → void - Adds a breadcrumb.
-
addSessionProperty(
String key, String value, {required bool permanent}) → void -
Annotates the session with a property defined by a
keyandvalue. -
addUserPersona(
String persona) → void -
Adds the current user persona to the provided
persona. -
attachToHostSdk(
{required bool enableIntegrationTesting}) → Future< bool> - Starts the Embrace SDK.
-
clearAllUserPersonas(
) → void - Clears the current users personas.
-
clearUserAsPayer(
) → void - Clears the current user's payer status.
-
clearUserEmail(
) → void - Clears the current user email.
-
clearUserIdentifier(
) → void - Clears the current user identifier.
-
clearUserName(
) → void - Clears the current user name.
-
clearUserPersona(
String persona) → void -
Clears the current user
persona. -
endAppStartup(
Map< String, String> ? properties) → void - Signifies that application startup has ended.
-
endMoment(
String name, String? identifier, Map< String, String> ? properties) → void -
End a moment with the provided
nameand optionalidentifier. -
endSession(
{bool clearUserInfo = true}) → void - Manually forces the end of the current session and starts a new session.
-
endView(
String name) → void - Signifies that a view has been unmounted.
-
getCurrentSessionId(
) → Future< String?> - Returns the id of the current session.
-
getDeviceId(
) → Future< String?> - Query the current device identifier.
-
getLastRunEndState(
) → Future< LastRunEndState> - Returns the end state of the previous run of the application.
-
getSessionProperties(
) → Future< Map< String, String> > - Returns all properties for the current session.
-
logBreadcrumb(
String message) → void - Logs a breadcrumb.
-
logDartError(
String? stack, String? message, String? context, String? library, {String? errorType, bool wasHandled = false}) → void - Sends information from a Dart error/exception to the host SDK so that a log can be delivered.
-
logError(
String message, Map< String, String> ? properties) → void -
Log
messageand optionalpropertiesusing the error log level. -
logInfo(
String message, Map< String, String> ? properties) → void -
Log
messageand optionalpropertiesusing the info log level. -
logInternalError(
String message, String details) → void - Logs an internal error within the SDK.
-
logNetworkRequest(
{required String url, required HttpMethod method, required int startTime, required int endTime, required int bytesSent, required int bytesReceived, required int statusCode, String? error, String? traceId}) → void - Log a network request.
-
logPushNotification(
{required String? title, required String? body, required String? subtitle, required int? badge, required String? category, required String? from, required String? messageId, required int? priority, required bool hasNotification, required bool hasData}) → void - Logs a breadcrumb that indicates that the app received a push notification
-
logWarning(
String message, Map< String, String> ? properties) → void -
Log
messageand optionalpropertiesusing the warning log level. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeSessionProperty(
String key) → void - Remove an existing property from the session
-
setUserAsPayer(
) → void - Sets the current user as a payer.
-
setUserEmail(
String email) → void -
Sets the current user email to the provided
email. -
setUserIdentifier(
String id) → void -
Sets the current user identifier to the provided
id. -
setUserName(
String name) → void -
Sets the current user name to the provided
name. -
startMoment(
String name, String? identifier, Map< String, String> ? properties) → void -
Start a moment with the provided
nameand optionalidentifier. -
startView(
String name) → void - Signifies that a view has been mounted.
-
toString(
) → String -
A string representation of this object.
inherited
-
triggerAnr(
) → void - Triggers an ANR (Application Not Responding).
-
triggerMethodChannelError(
) → void -
Triggers a
MethodChannelerror. -
triggerNativeSdkError(
) → void - Trigger a native SDK error.
-
triggerRaisedSignal(
) → void - Triggers a raised signal.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance ↔ EmbracePlatform
-
The default instance of EmbracePlatform to use.
getter/setter pair