Skip to content

iksoft/ikchatbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

ikChatBot Flutter Package

The ikChatBot Flutter package provides an easy way to integrate a customizable chatbot into your Flutter applications. This package allows you to quickly add a chat interface with interactive responses and user-friendly configuration options. With ikChatBot, you can enhance user engagement and provide automated assistance through a chat-based interface.

Features

thumbnail

Screenshot 1 Screenshot 2 Screenshot 2 Screenshot 2

Getting started

ikChatBot Package

The ikChatBot package provides a customizable chatbot widget for Flutter applications. This widget allows you to easily integrate a chatbot into your app with various customization options.

Features

  • Customizable chatbot appearance
  • User and bot icons
  • Customizable chat bubble colors
  • Control over inactivity and closing behavior
  • Background image support
  • Initial greeting and default responses
  • Placeholder for user input
  • Easy integration into Flutter apps
  • Add Rating to your Chat Bot
  • Send Rating feedback to your Mail
  • Use SMTP for secure Mail Sending
  • Use Bot typing.. features

Whether you're building a customer support app or just looking to add some interactivity to your application, ikChatBot can help you create a dynamic chatbot experience tailored to your needs.

Getting Started

To use this package, add ikchatbot to your pubspec.yaml file:

dependencies:
  ikchatbot: ^1.0.2

Import the package to your screen

import 'package:ikchatbot/ikchatbot.dart';

Copy and Paste this fuction to use the features of the plugin

final chatBotConfig = IkChatBotConfig(
    //SMTP Rating to your mail Settings
    ratingIconYes: const Icon(Icons.star),
    ratingIconNo: const Icon(Icons.star_border),
    ratingIconColor: Colors.black,
    ratingBackgroundColor: Colors.white,
    ratingButtonText: 'Submit Rating',
    thankyouText: 'Thanks for your rating!',
    ratingText: 'Rate your experience:',
    ratingTitle: 'Thank you for using the chatbot!',
    body: 'This is a test email sent from Flutter and Dart.',
    subject: 'Test Rating',
    recipient: '[email protected]',
    isSecure: false,
    senderName: 'Your Name',
    smtpUsername: 'Your Email',
    smtpPassword: 'your password',
    smtpServer: 'stmp.gmail.com',
    smtpPort: 587,
    //Settings to your system Configurations
    sendIcon: const Icon(Icons.send, color: Colors.black),
    userIcon: const Icon(Icons.person, color: Colors.white),
    botIcon: const Icon(Icons.android, color: Colors.white),
    botChatColor: const Color.fromARGB(255, 81, 80, 80),
    delayBot: 100,
    closingTime: 1,
    delayResponse: 1,
    userChatColor: Colors.blue,
    waitingTime: 1,
    keywords: keywords,
    responses: responses,
    backgroundColor: Colors.white,
    backgroundImageUrl: 'https://cdn.wallpapersafari.com/54/0/HluF7g.jpg',
    initialGreeting:
    "πŸ‘‹ Hello! \nWelcome to IkBot\nHow can I assist you today?",
    defaultResponse: "Sorry, I didn't understand your response.",
    inactivityMessage: "Is there anything else you need help with?",
    closingMessage: "This conversation will now close.",
    inputHint: 'Send a message',
    waitingText: 'Please wait...',
  );
);

Create a class to hold your keywords and resoponse for the bot

final List<String> keywords = [
  'who are you',
  'what is flutter',
  'fuck',
  'sorry'
];

final List<String> responses = [
  'I am a bot created by Iksoft Original, a proud Ghanaian',
  'Flutter transforms the app development process. Build, test, and deploy beautiful mobile, web, desktop, and embedded apps from a single codebase.',
  'You are such an idiot to tell me this. you dont have future. Look for Iksoft Original and seek for knowledge. here is his number +233550138086. call him you lazy deep shit',
  'Good! i have forgiven you. dont do that again!'
];

Full Example on how to use this plugin

import 'package:example/response.dart';
import 'package:flutter/material.dart';
import 'package:ikchatbot/ikchatbot.dart';

import 'keywords.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {


    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: MyHomePage(),
    );
  }
}

class MyHomePage extends StatefulWidget {

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  final chatBotConfig = IkChatBotConfig(
    //SMTP Rating to your mail Settings
    ratingIconYes: const Icon(Icons.star),
    ratingIconNo: const Icon(Icons.star_border),
    ratingIconColor: Colors.black,
    ratingBackgroundColor: Colors.white,
    ratingButtonText: 'Submit Rating',
    thankyouText: 'Thanks for your rating!',
    ratingText: 'Rate your experience:',
    ratingTitle: 'Thank you for using the chatbot!',
    body: 'This is a test email sent from Flutter and Dart.',
    subject: 'Test Rating',
    recipient: '[email protected]',
    isSecure: false,
    senderName: 'Your Name',
    smtpUsername: 'Your Email',
    smtpPassword: 'your password',
    smtpServer: 'stmp.gmail.com',
    smtpPort: 587,
    //Settings to your system Configurations
    sendIcon: const Icon(Icons.send, color: Colors.black),
    userIcon: const Icon(Icons.person, color: Colors.white),
    botIcon: const Icon(Icons.android, color: Colors.white),
    botChatColor: const Color.fromARGB(255, 81, 80, 80),
    delayBot: 100,
    closingTime: 1,
    delayResponse: 1,
    userChatColor: Colors.blue,
    waitingTime: 1,
    keywords: keywords,
    responses: responses,
    backgroundColor: Colors.white,
    backgroundImageUrl: 'https://cdn.wallpapersafari.com/54/0/HluF7g.jpg',
    initialGreeting:
    "πŸ‘‹ Hello! \nWelcome to IkBot\nHow can I assist you today?",
    defaultResponse: "Sorry, I didn't understand your response.",
    inactivityMessage: "Is there anything else you need help with?",
    closingMessage: "This conversation will now close.",
    inputHint: 'Send a message',
    waitingText: 'Please wait...',
  );

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        centerTitle: true,
        title: const Text('ikChatBot Example'),
      ),
      body: IkChatBot(config: chatBotConfig),
    );
  }
}

Additional information

To find more information, check out the package documentation.

Contributions are welcome! If you'd like to contribute to this package, please submit issues or pull requests on GitHub.

If you encounter any issues or need support, feel free to file issues on GitHub or contact us at [email protected].

Our team will do their best to respond promptly to issues and inquiries.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published