trsurveys 1.0.0
trsurveys: ^1.0.0 copied to clipboard
A plugin for TheoremReach Surveys SDK for both Android & iOS
TheoremReach Plugin #
Getting started: #
1. Initialise TheoremReach #
Call init() during app initialization
TheoremReach()
.init(apiToken: 'apiToken', userId: 'userId', listener: trListener);
2. Initialise callback listeners #
trListener(TheoremReachListener event) {
if (event == TheoremReachListener.theoremReachSurveyAvailable) {
print('survey available');
} else if (event == TheoremReachListener.onReward) {
print('on reward');
} else if (event == TheoremReachListener.onRewardCenterClosed) {
print('on closed');
} else if (event == TheoremReachListener.onRewardCenterOpened) {
print('on opened');
}
}
3. Call TheoremReach #
TheoremReach().show()
IMPORTANT: If you’re Publishing and using Proguard add these lines to your configuration file: #
-keep class theoremreach.com.** { *; }
For the complete implementation, please refer to the example repo.