SurvicateFlutterSdk class

Client for accessing Survicate SDK.

Constructors

SurvicateFlutterSdk()
Constructor for the Client for accessing Survicate SDK.

Properties

hashCode int
The hash code for this object.
no setterinherited
onQuestionAnsweredListener ↔ (dynamic Function(String?, num?, SurvicateAnswerModel)?)
listener triggered after a response submitted to each question.
getter/setter pair
onSurveyClosedListener ↔ (dynamic Function(String?)?)
listener triggered after user closes the survey using the close button.
getter/setter pair
onSurveyCompletedListener ↔ (dynamic Function(String?)?)
triggered when user responds to their last question and therefore finishes a survey.
getter/setter pair
onSurveyDisplayedListener ↔ (dynamic Function(String?)?)
listener triggered when survey gets loaded and appears in user’s interface.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

enterScreen(String? screenName) Future<bool?>
A survey can appear when your application user is viewing a specific screen. As an example, a survey can be triggered to show up on the home screen of the application, after a user spends there more than 10 seconds. To achieve such effect, you need to send information to Survicate about user entering a screen.
handlerMethodCalls(MethodCall call) Future
invokeEvent(String? eventName) Future<bool?>
You can log custom user events throughout your application. They can later be used in Survicate panel to trigger your surveys. Events trigger surveys instantly after occurring in your app.
leaveScreen(String? screenName) Future<bool?>
A survey can appear when your application user is viewing a specific screen. As an example, a survey can be triggered to show up on the home screen of the application, after a user spends there more than 10 seconds. To achieve such effect, you need to send information to Survicate about user leaving a screen.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerSurveyListeners({dynamic callbackSurveyDisplayedListener(String? surveyId)?, dynamic callbackQuestionAnsweredListener(String? surveyId, num? questionId, SurvicateAnswerModel answer)?, dynamic callbackSurveyClosedListener(String? surveyId)?, dynamic callbackSurveyCompletedListener(String? surveyId)?}) Future<bool?>
Registers Survey activity listeners
reset() Future<bool?>
This method will reset all user data stored on your device (views, traits, answers). If you need to test surveys on your device, this method might be helpful.
setUserTraits(UserTraitsModel? userTraits) Future<bool?>
You can assign custom attributes to your users. Those attributes can later be used to trigger the survey or even filter the survey results within Survicate panel. Please keep in mind that user traits are cached, you only have to provide them once, e.g. when user logs in, not after each initialize(). You can also change their values at any time (which may potentially trigger showing the survey).
toString() String
A string representation of this object.
inherited
unregisterSurveyListeners() Future<bool?>
Unregisters Survey activity listeners

Operators

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