Mobile SDK - Flutter
The Survicate Mobile SDK allows you to collect feedback from your mobile app users. Installed in your app, the SDK will enable you to trigger targeted surveys to better understand your users and collect their opinions about your products.
The SDK is maintained and supported by Survicate - The Customer Experience & Survey Software.
The detailed documentation is available here.
Requirements
- Using Survicate Mobile SDK requires an account at survicate.com. You can create your account here for free, or become invited to your company account by one of your colleagues.
- Additionally, please check iOS and Android library requirements, as they're applicable too.
Installation
To use this plugin, add survicate_sdk as a dependency in your pubspec.yaml file.
Configuration
Configuration for Android
- Configure your workspace key in
AndroidManifest.xmlfile.
<application
android:name=".MyApp"
>
<!-- ... -->
<meta-data android:name="com.survicate.surveys.workspaceKey" android:value="YOUR_WORKSPACE_KEY"/>
</application>
- Add the Survicate Maven repository to your project
build.gradlelocated underandroiddirectory.
allprojects {
repositories {
// ...
maven { url 'https://repo.survicate.com' }
}
}
Configuration for iOS
- Add workspace key to your
Info.plistfile.- Create
SurvicateDictionary. - Define
WorkspaceKeyString inSurvicateDictionary. YourInfo.plistfile should looks like this:
- Create
- Run
pod updatein youriosdirectory.
Initialization
Initialize the SDK in your application using initializeSdk() method. Call this method only once, in the main component (e.g lib/main.dart file).
import 'package:survicate_sdk/survicate_sdk.dart';
class _MyAppState extends State<MyApp> {
@override
void initState() {
super.initState();
SurvicateSdk.initializeSdk();
}
}