questlabs_flutter_sdk 0.0.1 questlabs_flutter_sdk: ^0.0.1 copied to clipboard
A Flutter package to integrate Quest Labs AI components into Flutter applications, supporting a range of customizable SDK components.
questlabs_flutter_sdk #
questlabs_flutter_sdk is a Flutter package designed to integrate Quest Labs AI components into your Flutter applications. This SDK supports a range of customizable components to enhance user engagement and provide analytics.
Features #
- AI Components: Easily add AI-driven components for enhanced user interaction and data insights.
- Customizable UI: Modify appearance and behavior to fit your app’s design.
- API Integration: Streamlined connection to Quest Labs’ backend for real-time data processing and AI capabilities.
Getting Started #
- Ensure Flutter is set up on your machine.
- Add the package to your
pubspec.yaml
file:
dependencies:
questlabs_flutter_sdk: ^1.0.0
Install the package:
flutter pub get
Usage #
Import the package and initialize the SDK:
void main() {
runApp(const MyApp());
getItInit();
getIt<SharedPref>().init();
}
Add the following BlocProvider setup to your providers list:
providers: [
BlocProvider(
create: (context) => getIt<Cubit>(),
),
],
Configuration Parameters apiKey: Your Quest Labs API key. entityId: Unique identifier for each entity. campaignId: Unique identifier for each campaign. userId: Unique identifier for each user. token: Your Quest Labs token.
Example Usage #
Here's an example of how to use the OnBoarding Component
widget in a Flutter application:
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:questlabs_flutter_sdk/questlabs_flutter_sdk.dart';
void main() {
runApp(const MyApp());
getItInit();
getIt<SharedPref>().init();
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MultiBlocProvider(
providers: [
BlocProvider(
create: (context) => getIt<ComponentStateCubit>(),
),
],
child: MaterialApp(
title: 'Flutter Demo',
home: OnBoardingQuizTemplate2(
questProvider: QuestProvider(
apiKey: "apiKey",
entityId: "entityId",
),
onBoardingProps: OnBoardingProps2(
token: "token",
userId: "userId",
campaignId: "campaignId",
),
)
),
);
}
}
Additional information #
For detailed documentation, visit the Quest Labs SDK Docs. Contributions, issues, and discussions are welcome on our GitHub page.
To create components, you can visit the Quest Labs staging website here.