Surveys class

Constructors

Surveys()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

getAvailableSurveys() Future<List<String>>
Returns an array containing the available surveys. callback availableSurveysCallback callback with argument available surveys
hasRespondedToSurvey(String surveyToken) Future<bool>
Sets a block of code to be executed just before the SDK's UI is presented. This block is executed on the UI thread. Could be used for performing any UI changes after the survey's UI is dismissed. callback A callback that gets executed after the survey's UI is dismissed.
setAppStoreURL(String appStoreURL) Future<void>
iOS Only Sets url for the published iOS app on AppStore, You can redirect NPS Surveys or AppRating Surveys to AppStore to let users rate your app on AppStore itself. appStoreURL A String url for the published iOS app on AppStore
setAutoShowingEnabled(bool isEnabled) Future<void>
Sets whether auto surveys showing are enabled or not. isEnabled A boolean to indicate whether the surveys auto showing are enabled or not.
setEnabled(bool isEnabled) Future<void>
@summary Sets whether surveys are enabled or not. If you disable surveys on the SDK but still have active surveys on your Instabug dashboard, those surveys are still going to be sent to the device, but are not going to be shown automatically. To manually display any available surveys, call Instabug.showSurveyIfAvailable(). Defaults to true. isEnabled A boolean to set whether Instabug Surveys is enabled or disabled.
setOnDismissCallback(OnDismissSurveyCallback callback) Future<void>
Sets a block of code to be executed just before the SDK's UI is presented. This block is executed on the UI thread. Could be used for performing any UI changes after the survey's UI is dismissed. callback A callback that gets executed after the survey's UI is dismissed.
setOnShowCallback(OnShowSurveyCallback callback) Future<void>
Sets a block of code to be executed just before the SDK's UI is presented. This block is executed on the UI thread. Could be used for performing any UI changes before the survey's UI is shown. callback A callback that gets executed before presenting the survey's UI.
setShouldShowWelcomeScreen(bool shouldShowWelcomeScreen) Future<void>
Setting an option for all the surveys to show a welcome screen before shouldShowWelcomeScreen A boolean for setting whether the welcome screen should show.
showSurvey(String surveyToken) Future<void>
Shows survey with a specific token. Does nothing if there are no available surveys with that specific token. Answered and cancelled surveys won't show up again. surveyToken - A String with a survey token.
showSurveyIfAvailable() Future<void>
Shows one of the surveys that were not shown before, that also have conditions that match the current device/user. Does nothing if there are no available surveys or if a survey has already been shown in the current session.