getScreenName static method
Gets the current screen name asynchronously.
The screen name represents the current view or page that the user is on. This is useful for tracking navigation and user flow through the application.
Returns a Future<String> containing the current screen name
Implementation
static Future<String> getScreenName() {
final Completer<String> completer = Completer<String>();
BlueConicPlatform.instance.getScreenName().then((result) {
if (result.success) {
completer.complete((result.data as String?) ?? '');
} else {
completer.completeError(Exception(result.error ?? 'Unknown error'));
}
});
return completer.future;
}