Flutter
Last updated
Last updated
Below are the various processes involved in setting up Spotcheck in Flutter. Kindly refer example applications
To install the SurveySparrowSdk, make sure you are in the root folder of your Flutter project in the terminal and run the following command.
Declare and initialize the spotcheck variable using the Spotcheck().
Anonymous users
If you wish not to keep track of users' data, you can follow the below syntax for initialization.
Known Users
If you wish to keep track of users' data and perform conditional Survey triggers, you can follow the below syntax for initialization.
Then, add the SpotCheck initialized variable to your app screen. Add it only once in the builder of your Material App.
It provides the ability to keep track of screens the users are visiting and to enable the survey trigger on that screen.
If a survey needs to be triggered on the payment page, the name of the ScreenName should be specified in the TrackScreen function.
It provides the ability to keep track of events which when triggered, will enable the survey to be popped.
If a survey needs to be triggered when the user completes a payment, then the TrackEvent function should be called with the respective ScreenName and optional custom properties.