logScreenViewContextUnLoad static method
Logs the unloading context of a screen view with additional information.
This function sends a screen view unload event to the native side with the logical page name and referrer information. It uses platform-specific channel communication to invoke the 'logScreenViewContextUnLoad' method.
Throws a TealeafException if there is an error during the process, including if there is an issue with the Tealeaf plugin or platform-specific errors.
Example usage:
await logScreenViewContextUnLoad('DetailsPage', 'HomePage');
Parameters:
logicalPageName
: The logical name of the page/screen for the screen view event.referrer
: The logical name of the referring page/screen for context information.
Throws:
- TealeafException: If there is an issue processing the logScreenViewContextUnLoad message.
Implementation
static Future<void> logScreenViewContextUnLoad(
String logicalPageName, String referrer) async {
try {
// Send the screen view event to the native side
return await _channel.invokeMethod('logScreenViewContextUnLoad',
<dynamic, dynamic>{'name': logicalPageName, 'referrer': referrer});
} on PlatformException catch (pe) {
throw TealeafException(pe,
msg:
'Unable to process logScreenViewContextUnLoad (update) message!');
}
}