chatbot_launcher 0.0.2
chatbot_launcher: ^0.0.2 copied to clipboard
A customizable chatbot launcher widget for Flutter apps with a popup interface and theming support.
π§ Flutter chatbot Package #
A lightweight, customizable chatbot launcher widget for Flutter apps. Launch your chatbot with a floating action button and provide a delightful, branded chat experience.
β¨ Features #
- π’ Easy integration β just plug and play
- π¨ Fully customizable header, footer, and chat UI
- π§± Configurable using
chatbotConfigobject - πΌοΈ Add custom icons, images, colors, and text
- β‘ Launch with a Floating Action Button
- π¬ Built-in layout for chatbot popup window
- βοΈ Minimal dependencies and ready to theme
π Getting Started #
1. Add Dependency #
In your pubspec.yaml:
dependencies:
chatbot: ^1.0.0
Then run:
flutter pub get
π οΈ Usage #
Basic Integration #
import 'package:flutter/material.dart';
import 'package:chatbot/chatbot.dart';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'chatbot Demo',
home: Scaffold(
appBar: AppBar(title: const Text("chatbot Example")),
body: const Center(child: Text("Home Screen")),
floatingActionButton: chatbotLauncher(
config: chatbotConfig(
fabColor: Colors.purple,
headerTitle: "Hi! Need Help?",
headerSubtitle: "Ask us anything β weβre here to help.",
poweredByBrand: "AwesomeTech.AI",
poweredByLogo: 'assets/logo.png',
),
),
),
);
}
}
βοΈ Configuration #
Use chatbotConfig to customize everything:
chatbotConfig(
topMargin: 80.0,
fabColor: Colors.blueAccent,
fabIconColor: Colors.white,
headerColor: Colors.white,
headerTitle: "Hello!",
headerSubtitle: "Weβre here to support you.",
headerIcon: 'assets/header_icon.png',
backgroundImage: 'assets/background.png',
poweredByText: "POWERED BY",
poweredByLogo: 'assets/logo.png',
poweredByBrand: "YourBrand.AI",
sendIconColor: Colors.blue,
hintTextColor: Colors.grey,
)
πΌοΈ Example Screenshots (optional) #
π Example Project #
You can find a full working demo in the example/ folder.
To run it:
cd example
flutter run
π API Reference #
| Property | Type | Description |
|---|---|---|
fabColor |
Color |
FAB background color |
fabIconColor |
Color |
FAB icon color |
headerTitle |
String |
Title at the top of the chatbot popup |
headerSubtitle |
String |
Subtitle text below the header title |
headerIcon |
String? |
Optional header icon asset path |
backgroundImage |
String? |
Optional background image asset path |
poweredByText |
String |
Text shown before brand logo |
poweredByLogo |
String? |
Optional brand logo asset path |
poweredByBrand |
String |
Brand name displayed in footer |
sendIconColor |
Color |
Color of the send button icon |
hintTextColor |
Color |
Color of the hint text in the input field |
topMargin |
double |
Top margin for the popup dialog |
π€ Contributing #
Contributions are welcome! Feel free to:
- Fork the repo
- Open issues or feature requests
- Submit pull requests with improvements
Please follow standard Flutter/Dart conventions and keep PRs focused.
ποΈ License #
MIT License
MIT License
Copyright (c) 2025 [Your Name]
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
π Links #
π‘ Pro Tip: Keep your README in sync with code changes and API updates for a smooth developer experience.