leaveScreen method

Future<bool?> leaveScreen(
  1. String? screenName
)

A survey can appear when your application user is viewing a specific screen. As an example, a survey can be triggered to show up on the home screen of the application, after a user spends there more than 10 seconds. To achieve such effect, you need to send information to Survicate about user leaving a screen.

screenName the name of the screen the user is leaving.

Implementation

Future<bool?> leaveScreen(String? screenName) async {
  if (screenName == null || screenName.isEmpty) {
    return false;
  }

  return await _channel.invokeMethod('leaveScreen', <String, dynamic>{
    'screenName': screenName,
  });
}