showPromoterSurvey method

Future<bool> showPromoterSurvey(
  1. {bool? inheritMaterialTheme,
  2. bool? inheritCupertinoTheme,
  3. PsOptions? options,
  4. bool? force}

Probably shows the Promoter Score survey depending on options, specifically PsOptions.frequency, PsOptions.initialDelay and PsOptions.minimumAppStarts settings.

Wiredash decides whether it is a good time to show the promoter score survey or not, making sure your users don't see the promoter score survey too often while maintaining a continuous stream of promoter score ratings.

Use force to explicitly show open the promoter score survey. This is useful when you want to trigger the flow at specific/rare times in your business logic. E.g. a user has paired their Action camera and transferred more than three pictures.

This method returns true when the flow got opened or false when it was not a good time to show it.

When providing options, those settings will be used, overwriting the ones defined in Wiredash.psOptions. The options will then be merged with defaultPsOptions, filling your null values


Future<bool> showPromoterSurvey({
  bool? inheritMaterialTheme,
  bool? inheritCupertinoTheme,
  PsOptions? options,
  bool? force,
}) async {
  _captureAppTheme(inheritMaterialTheme, inheritCupertinoTheme);
  _model.psOptionsOverride = options;

  if (force == true) {
    await WiredashFlow.promoterScore);
    return true;
  } else {
    final actualOptions = _model.psOptions;

    final properties = DiagnosticPropertiesBuilder();
    final trigger =;
    final shouldShow = await trigger.shouldShowPromoterSurvey(
      options: actualOptions,
      diagnosticProperties: properties,
    if (shouldShow) {
      await WiredashFlow.promoterScore);
      return true;
    } else {
      final reasons ='\n - ');
      // ignore: avoid_print
        'Wiredash: Not showing promoter score survey because:\n - $reasons',
      if (kDebugMode) {
          'For testing, use Wiredash.of(context).showPromoterSurvey(force: true);',
      return false;