boogi_flutter_sdk 1.0.2
boogi_flutter_sdk: ^1.0.2 copied to clipboard
A Flutter SDK for embedding Boogi's catalogue widget using a secure login token.
boogi_flutter_sdk #
A Flutter SDK for embedding Boogi's catalogue widget securely using a login token.
π Features #
- Embeds Boogi's offer catalogue inside your app via WebView using our end user token-based sessions.
- Simple integration with a single method call to initialize and display the widget.
π Please refer to the full documentation for authentication and session handling:
Boogi API Docs - Client Authentication
π Installation #
Add to your pubspec.yaml
:
dependencies:
boogi_flutter_sdk: ^1.0.0
Then run:
flutter pub get
π§βπ» Usage #
1. Initialize a Session #
Before rendering the widget, you must start a session using a valid Boogi session token. This should be done at the beginning of your app:
void main() {
Boogi.startSession("YOUR_SESSION_TOKEN"); // Replace with your actual session token
runApp(const MyApp());
}
βΉοΈ You can obtain session tokens from your backend using Boogiβs secure authentication APIs.
2. Display the Catalogue Widget #
Embed the Boogi catalogue widget into your Flutter app using the Boogi.getWidget()
method.
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(title: const Text('Boogi Demo')),
body: Boogi.getWidget(), // Renders the embedded WebView
),
);
}
}
This renders a WebView with the Boogi catalogue based on your session configuration.
π§© Full Example #
import 'package:flutter/material.dart';
import 'package:boogi_flutter_sdk/boogi_flutter_sdk.dart';
void main() {
Boogi.startSession("YOUR_SESSION_TOKEN"); // Sample session token
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(title: const Text('Boogi Demo')),
body: Boogi.getWidget(),
),
);
}
}
π Notes #
- The WebView content and behavior are configured on the Boogi backend based on your session token.
- Make sure you handle session generation securely on your backend.
- Widget behavior may vary based on the tokenβs user permissions and configuration.
π© Support #
Need help? Reach out to us via the Boogi dashboard or consult the Boogi Developer Docs.