Referral Component
The Referral components are reusable flutter component designed to facilitate user referrals and rewards. It allows users to earn rewards by sharing a referral code with friends
Components Visuals
To unlock early access to the component Get Access
Installation
To use the Referral component , you need to install questlabs_flutter_sdk
package into your project
First, navigate to the root directory of your Flutter project. Open the
pubspec.yaml
file using your preferred code editor.Under the
dependencies
section in yourpubspec.yaml
file, add the following line to include thequestlabs_flutter_sdk
packageAfter saving your changes, open your terminal or command prompt and run the following command to fetch the new dependency
Props of Referral Component
You can customize the UI with the type of QuestThemeConfig would be
Basic Usage:
In your
main()
function, ensure you initialize the app and dependencies as follows:
Add the following
BlocProvider
setup to yourproviders
list to initialize theShareWithComponentCubit
for state management:
Ensure you provide your entity ID, API key, token, user ID, and quest ID
Watch the YouTube video below for a step-by-step guide on testing the Referral component in your Flutter project.
Last updated