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:
| Key | Value |
|---|---|
| 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:
| Name | Type | Description |
|---|---|---|
| passed | String | "true" or "false" indicating whether targeting logic passed |
| surveyUrl | String | Survey URL when evaluation passed; "null" otherwise |
| creativeType | String | Creative type when available; "null" otherwise |
| error | String | Error details when evaluation fails; "null" otherwise |
evaluateIntercept
Returns a Map<String, String> for a single intercept:
| Name | Type | Description |
|---|---|---|
| interceptId | String | Intercept ID that was evaluated |
| passed | String | "true" or "false" indicating whether targeting logic passed |
| surveyUrl | String | Survey URL when evaluation passed; "null" otherwise |
| creativeType | String | Creative type when available; "null" otherwise |
| error | String | Error 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
| Param | Type | Description |
|---|---|---|
| brandId | String | Brand ID |
| projectId | String | Project 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
| Param | Type | Description |
|---|---|---|
| brandId | String | Brand ID |
| projectId | String | Project ID |
| extRefId | String | External 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
| Param | Type | Description |
|---|---|---|
| interceptId | String | Intercept 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
| Param | Type | Description |
|---|---|---|
| interceptId | String | Intercept 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
| Param | Type | Description |
|---|---|---|
| targetUrl | String | Survey 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
| Param | Type | Description |
|---|---|---|
| viewName | String | Name 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
| Param | Type | Description |
|---|---|---|
| key | String | Property key |
| value | String | String value to assign |
Example
await qualtrics.setString('firstName', 'John');
setNumber(key, value) ⇒ Future<void>
Sets a numeric custom property.
Kind: instance method
| Param | Type | Description |
|---|---|---|
| key | String | Property key |
| value | double | Numeric 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
| Param | Type | Description |
|---|---|---|
| key | String | Property key |
Example
await qualtrics.setDateTime('currentDate');
setLogLevel(logLevel) ⇒ Future<void>
Sets the SDK log level.
Currently supported on Android only. Supported values are "info" and "none".
Kind: instance method
| Param | Type | Description |
|---|---|---|
| logLevel | String | "info" or "none" |
Example
await qualtrics.setLogLevel('info');