showSurvey static method

Future<void> showSurvey({
  1. required String surveyId,
  2. SurveyFormat format = SurveyFormat.SURVEY,
})

showSurvey

Shows a survey

Available Platforms

Web, Android, iOS

Implementation

static Future<void> showSurvey({
  required String surveyId,
  SurveyFormat format = SurveyFormat.SURVEY,
}) async {
  if (!kIsWeb && !io.Platform.isAndroid && !io.Platform.isIOS) {
    debugPrint(
      'showSurvey is not available for current operating system',
    );
    return;
  }

  await _channel.invokeMethod('showSurvey', {
    'surveyId': surveyId,
    'format': _getSurveyFormatValue(format),
  });
}