MethodChannelEmbrace class
An implementation of EmbracePlatform that uses method channels.
- Inheritance
-
- Object
- PlatformInterface
- EmbracePlatform
- MethodChannelEmbrace
Constructors
- MethodChannelEmbrace({Platform? platform})
- Constructs an instance of MethodChannelEmbrace
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isStarted → bool
-
Whether the SDK has been started.
no setteroverride
- methodChannel → MethodChannel
-
The method channel used to interact with the native platform.
final
-
remoteConfig
→ Map<
String, dynamic> -
Map representing the remote config provided by the platform SDK.
no setterinherited
-
remoteConfigUpdates
→ Stream<
Map< String, dynamic> > -
A stream of updates to the remote config provided by the platform SDK.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addSessionProperty(
String key, String value, {required bool permanent}) → void -
Annotates the session with a property defined by a
key
andvalue
.override -
attachToHostSdk(
{required bool enableIntegrationTesting}) → Future< bool> -
Starts the Embrace SDK.
override
-
clearAllUserPersonas(
) → void -
Clears the current users personas.
override
-
clearUserAsPayer(
) → void -
Clears the current user's payer status.
override
-
clearUserEmail(
) → void -
Clears the current user email.
override
-
clearUserIdentifier(
) → void -
Clears the current user identifier.
override
-
clearUserName(
) → void -
Clears the current user name.
override
-
clearUserPersona(
String persona) → void -
Clears the current user
persona
.override -
endAppStartup(
Map< String, String> ? properties) → void -
Signifies that application startup has ended.
override
-
endMoment(
String name, String? identifier, Map< String, String> ? properties) → void -
End a moment with the provided
name
and optionalidentifier
.override -
endSession(
{bool clearUserInfo = true}) → void -
Manually forces the end of the current session and starts a new session.
override
-
endView(
String name) → void -
Signifies that a view has been unmounted.
override
-
getDeviceId(
) → Future< String?> -
Query the current device identifier.
override
-
getSessionProperties(
) → Future< Map< String, String> > -
Returns all properties for the current session.
override
-
handleMethodCall(
MethodCall call) → Future - Callback used to process incoming method calls from the native method channel.
-
logBreadcrumb(
String message) → void -
Logs a breadcrumb.
override
-
logDartError(
String? stack, String? message, String? context, String? library) → void -
Sends information from a Dart error/exception to the host SDK
so that a log can be delivered.
override
-
logError(
String message, Map< String, String> ? properties, {required bool allowScreenshot}) → void -
Log
message
and optionalproperties
using the error log level.override -
logInfo(
String message, Map< String, String> ? properties) → void -
Log
message
and optionalproperties
using the info log level.override -
logInternalError(
String message, String details) → void -
Logs an internal error within the SDK.
override
-
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.
override
-
logWarning(
String message, Map< String, String> ? properties, {required bool allowScreenshot}) → void -
Log
message
and optionalproperties
using the warning log level.override -
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
override
-
setRemoteConfig(
Map< String, dynamic> newConfig) → void -
Sets the value of remoteConfig.
inherited
-
setUserAsPayer(
) → void -
Sets the current user as a payer.
override
-
setUserEmail(
String email) → void -
Sets the current user email to the provided
email
.override -
setUserIdentifier(
String id) → void -
Sets the current user identifier to the provided
id
.override -
setUserName(
String name) → void -
Sets the current user name to the provided
name
.override -
setUserPersona(
String persona) → void -
Sets the current user persona to the provided
persona
.override -
startMoment(
String name, String? identifier, Map< String, String> ? properties, {required bool allowScreenshot}) → void -
Start a moment with the provided
name
and optionalidentifier
.override -
startView(
String name) → void -
Signifies that a view has been mounted.
override
-
throwIfNotStarted(
) → void - Throws a StateError if the SDK has not been started.
-
toString(
) → String -
A string representation of this object.
inherited
-
triggerAnr(
) → void -
Triggers an ANR (Application Not Responding).
override
-
triggerMethodChannelError(
) → void -
Triggers a
MethodChannel
error.override -
triggerNativeSdkError(
) → void -
Trigger a native SDK error.
override
-
triggerRaisedSignal(
) → void -
Triggers a raised signal.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited