Skip to content

Wootric/WootricSDK-flutter

Repository files navigation

Flutter Plugin for Wootric SDK

This is an official Wootric SDK Wrapper for Flutter by InMoment.

Website

Official Documentation:

Example

  1. Import wootricsdk_flutter
  2. Init the library with your credentials
WootricsdkFlutter.configure(
  clientId: "<CLIENT_ID",
  accountToken: "<ACCOUNT_TOKEN>",
);    
     
  1. Setup your survey properties
 WootricsdkFlutter.setEndUserEmail('test@example.com');
 WootricsdkFlutter.setEndUserExternalId('123456789');
 WootricsdkFlutter.setEndUserProperties({
    'App': 'My App'
 });
  1. Presenting Survey
WootricsdkFlutter.forceSurvey(true); // Only for test
WootricsdkFlutter.showSurvey();          
  1. Targeted Sampling
WootricsdkFlutter.showSurveyWithEvent("event_name");     
  1. Color Customization (iPhone & Smartphones only)
    WootricsdkFlutter.setSliderColor("#FF0000");
    WootricsdkFlutter.setSendButtonBackgroundColor("#FF0000");
    WootricsdkFlutter.setThankYouButtonBackgroundColor("#FF0000");
    WootricsdkFlutter.setSocialSharingColor("#FF0000");  

Logging

SDK Supports various types of logging,

WootricsdkFlutter.setLogLevelVerbose();
WootricsdkFlutter.setLogLevelError();
WootricsdkFlutter.setLogLevelNone();

showDisclaimer

When disclaimerText, link and linkText are set, the survey will display the text and link at the bottom of the survey.

WootricsdkFlutter.showDisclaimer("Learn how we handle your feedback","https://example.com/terms-of-use","here");