beon_widget_sdk 1.0.5+1
beon_widget_sdk: ^1.0.5+1 copied to clipboard
A fully-featured, customizable chat widget SDK for Flutter with real-time messaging support.
import 'package:beon_widget_sdk/beon_widget_sdk.dart';
import 'package:flutter/material.dart';
void main() {
runApp(const ExampleApp());
}
/// Example app demonstrating the Beon Widget SDK
class ExampleApp extends StatelessWidget {
const ExampleApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Beon Widget Example',
debugShowCheckedModeBanner: false,
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(seedColor: Colors.indigo),
useMaterial3: true,
),
home: const ExampleHomePage(),
);
}
}
class ExampleHomePage extends StatelessWidget {
const ExampleHomePage({super.key});
@override
Widget build(BuildContext context) {
return BeonChatWidget(
config: BeonConfig(
// Replace with your actual API key from https://app.beon.chat
apiKey: 'your_api_key',
// Optional: Override settings from API
primaryColor: Colors.indigo,
position: BeonPosition.bottomRight,
fullScreen: true,
// Customize header
headerTitle: 'Support Chat',
headerSubtitle: 'We typically reply within minutes',
// Enable/disable features
// enablePollingFallback: false, // Disabled by default
),
);
}
}