Flutter
Overview
The Blitzllama Flutter SDK allows you to deliver in-app surveys seamlessly within your Flutter application. By integrating the SDK, you can collect targeted user feedback during critical moments in the user journey.
Key Features
Quickly embed surveys via configurable triggers.
Identify and track users to avoid duplicate surveys.
Personalize surveys using user attributes and event properties (optional).
Localize surveys by setting preferred languages (optional).
Requirements
Access to the Blitzllama dashboard for API key retrieval and trigger configuration.
Getting Started
Before You Begin
Obtain Your API Key: Log in to the Blitzllama dashboard, navigate to the Connections tab, select Flutter, and retrieve your API key.
Confirm Compatibility: Ensure your Flutter project is set up and running.
Quick Start (10 Minutes)
Open your
pubspec.yaml
file and add the following dependency:
Run the command:
Import Blitzllama in your Dart code:
Initialize the SDK: Add the initialization code in the file where Blitzllama functions will be invoked:
If you face issues with iOS builds, add the following to your Podfile
:
Check pub.dev for usages and examples.
Managing Users
Create a User: Create a unique user ID to ensure consistency and avoid multiple surveys for the same user
Update User Email (Optional): You can associate an email address with the user
Update User Name (Optional): Personalize surveys by associating a user name
Set User Attributes (Optional): Add user attributes for targeting specific cohorts
Allowed data_type values are "string", "number", "date", and "boolean".
Set Survey Language (Optional): Define the preferred survey language in ISO 639-1 codes.
Logout User (Optional): Clear the user session by calling
Adding Triggers
Triggering a Survey: Add triggers to initiate surveys at key moments (e.g., button press or page load)
Adding Event Properties (Optional): Attach properties to a trigger for advanced targeting
These properties can be used to segment and target users based on context, which can be configured in the Blitzllama dashboard.
FAQ & Troubleshooting
Survey not showing up?
Ensure
createUser
is called beforetriggerEvent
.Verify that the event name matches the Blitzllama dashboard configuration.
Survey not appearing on app launch?
Add a callback to the
createUser
function to handle potential race conditions:
Switching users?
Call
logout()
before creating a new user.
How to create triggers?
Add a new
trigger_name
in your app; it will automatically sync with the Blitzllama dashboard.Alternatively, configure the trigger in the Blitzllama dashboard first, then use it in your app.
Next Steps
Start by adding triggers for the top 5 critical user actions in your app.
Create your first survey on the Blitzllama dashboard.
Customize the survey UI/UX on the dashboard to align with your brand.
For additional support, reach out via support chat or email at tech@blitzllama.com.
Last updated