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.