Skip to main content

App Feedback Flutter API Reference

Use QualtricsDigitalFlutterPlugin to initialize, evaluate, and display Mobile App Feedback intercepts from Flutter.

import 'package:qualtrics_digital_flutter_plugin/qualtrics_digital_flutter_plugin.dart';

var qualtrics = QualtricsDigitalFlutterPlugin();

Initialization results​

initializeProject and initializeProjectWithExtRefId return a Map<String, String> where:

KeyValue
Intercept ID"true" or "false" indicating whether that intercept initialized successfully

Targeting results​

evaluateProject​

Returns a Map<String, Map<String, String>> keyed by intercept ID. Each inner map contains:

NameTypeDescription
passedString"true" or "false" indicating whether targeting logic passed
surveyUrlStringSurvey URL when evaluation passed; "null" otherwise
creativeTypeStringCreative type when available; "null" otherwise
errorStringError details when evaluation fails; "null" otherwise

evaluateIntercept​

Returns a Map<String, String> for a single intercept:

NameTypeDescription
interceptIdStringIntercept ID that was evaluated
passedString"true" or "false" indicating whether targeting logic passed
surveyUrlStringSurvey URL when evaluation passed; "null" otherwise
creativeTypeStringCreative type when available; "null" otherwise
errorStringError details when evaluation fails; "null" otherwise

initializeProject(brandId, projectId) ⇒ Future<Map<String, String>>​

Initializes the Qualtrics project with the specified brand and project IDs.

Kind: instance method
Returns: Future<Map<String, String>> - initialization results keyed by intercept ID

ParamTypeDescription
brandIdStringBrand ID
projectIdStringProject ID
Example​
var initResults = await qualtrics.initializeProject('BRAND_ID', 'PROJECT_ID');
print(initResults);

initializeProjectWithExtRefId(brandId, projectId, extRefId) ⇒ Future<Map<String, String>>​

Initializes the Qualtrics project for XM Directory using an external reference ID.

Kind: instance method
Returns: Future<Map<String, String>> - initialization results keyed by intercept ID

ParamTypeDescription
brandIdStringBrand ID
projectIdStringProject ID
extRefIdStringExternal reference ID used for XM Directory integration
Example​
var initResults = await qualtrics.initializeProjectWithExtRefId(
'BRAND_ID',
'PROJECT_ID',
'EXT_REF_ID',
);

evaluateProject() ⇒ Future<Map<String, Map<String, String>>>​

Evaluates all initialized intercepts.

Kind: instance method
Returns: Future<Map<String, Map<String, String>>> - targeting results keyed by intercept ID

Example​
var evaluateProjectResult = await qualtrics.evaluateProject();
for (var interceptId in evaluateProjectResult.keys) {
var targetingResult = evaluateProjectResult[interceptId]!;
var passed = targetingResult['passed'];
var surveyUrl = targetingResult['surveyUrl'];
}

evaluateIntercept(interceptId) ⇒ Future<Map<String, String>>​

Evaluates a single intercept.

Kind: instance method
Returns: Future<Map<String, String>> - targeting result for the intercept

ParamTypeDescription
interceptIdStringIntercept ID to evaluate
Example​
var targetingResult = await qualtrics.evaluateIntercept('INTERCEPT_ID');
if (targetingResult['passed'] == 'true') {
// ready to display
}

display() ⇒ Future<bool>​

Displays a creative for intercepts previously evaluated with evaluateProject.

If a specific intercept was evaluated with evaluateIntercept, use displayIntercept instead of display.

Kind: instance method
Returns: Future<bool> - whether a creative was displayed

Example​
var evaluateProjectResult = await qualtrics.evaluateProject();
var displayed = await qualtrics.display();

displayIntercept(interceptId) ⇒ Future<bool>​

Displays a creative for a specific intercept previously evaluated with evaluateIntercept.

Kind: instance method
Returns: Future<bool> - whether a creative was displayed

ParamTypeDescription
interceptIdStringIntercept ID to display
Example​
var targetingResult = await qualtrics.evaluateIntercept('INTERCEPT_ID');
if (targetingResult['passed'] == 'true') {
var displayed = await qualtrics.displayIntercept('INTERCEPT_ID');
}

displayTarget(targetUrl) ⇒ Future<bool>​

Displays the provided survey URL in the Qualtrics webview.

Kind: instance method
Returns: Future<bool> - whether the target was displayed

ParamTypeDescription
targetUrlStringSurvey URL to display
Example​
var targetingResult = await qualtrics.evaluateIntercept('INTERCEPT_ID');
if (targetingResult['passed'] == 'true') {
await qualtrics.displayTarget(targetingResult['surveyUrl']!);
}

registerViewVisit(viewName) ⇒ Future<void>​

Records a visit to a particular view.

Kind: instance method

ParamTypeDescription
viewNameStringName of the view to record
Example​
await qualtrics.registerViewVisit('HomeScreen');

resetTimer() ⇒ Future<void>​

Resets the timer used for Time Spent In App.

Kind: instance method

Example​
await qualtrics.resetTimer();

resetViewCounter() ⇒ Future<void>​

Resets the view count used for View Count.

Kind: instance method

Example​
await qualtrics.resetViewCounter();

setString(key, value) ⇒ Future<void>​

Sets a string custom property.

Kind: instance method

ParamTypeDescription
keyStringProperty key
valueStringString value to assign
Example​
await qualtrics.setString('firstName', 'John');

setNumber(key, value) ⇒ Future<void>​

Sets a numeric custom property.

Kind: instance method

ParamTypeDescription
keyStringProperty key
valuedoubleNumeric value to assign
Example​
await qualtrics.setNumber('age', 42);

setDateTime(key) ⇒ Future<void>​

Sets the current datetime as a custom property for the specified key.

Kind: instance method

ParamTypeDescription
keyStringProperty key
Example​
await qualtrics.setDateTime('currentDate');

setLogLevel(logLevel) ⇒ Future<void>​

Sets the SDK log level.

warning

Currently supported on Android only. Supported values are "info" and "none".

Kind: instance method

ParamTypeDescription
logLevelString"info" or "none"
Example​
await qualtrics.setLogLevel('info');