パッケージ、リポジトリ、アプリカテゴリを検索

apptex_chat のカバー
パッケージ詳細v2.0.0

apptex_chat

このパッケージは、チャットシステムをより簡単かつ使いやすくし、ワンクリックでチャット機能を制御できるようにするものです。

30日間ダウンロード
81
いいね数
15
Pub ポイント
60

パッケージをインストール

flutter pub add apptex_chat

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

Apptex Chatは、アプリケーション内のチャットシステムの実装を簡素化することを目的としたFlutterパッケージです。直感的で使いやすいインターフェースを提供し、開発者がチャット機能を最小限の努力で管理できるようにします。たった1回のクリックで完了する場合も少なくありません。導入が簡単なように設計されており、メッセージ送信、入力中のインジケーター、メッセージ履歴などの一般的なチャット機能をスムーズに処理できます。開発時間を短縮しつつ、洗練された快適なデザインを維持することを目指しています。カスタムコードを大幅に必要としないリアルタイム通信が必要なアプリに最適です。

用途

  • インスタントメッセージングアプリ
  • カスタマーサポートチャットインターフェース
  • アプリ内でのピアツーピア通信
  • リアルタイム共同作業ツール
  • 社内チームメッセージングシステム

主な機能

  • ワンクリック機能制御
  • 事前構築されたチャットUIコンポーネント
  • Firebase やその他のバックエンドとの簡単な統合
  • メッセージ履歴および配信状態のサポート
  • カスタマイズ可能なテーマとスタイル

適している対象

  • 迅速なチャット実装を求める開発者
  • 軽量チャット機能を必要とするアプリ
  • チャット機能付きのMVPを構築するチーム
  • 開発者の生産性を最優先とするプロジェクト

注意事項

  • 提供されたテーマ以外のカスタマイズは限定的
  • 外部のバックエンドサービスに依存しています
  • 組み込み認証なし
  • 高度な機能を利用するには追加の設定が必要になる場合があります

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

This package is a powerful and versatile solution for implementing real-time chat functionality in your Flutter applications. Built on Firebase Firestore and Firebase Cloud, this package provides a unique and pre-designed chatting system with features such as push notifications and a customizable theme for the Inbox Screen and Chat Screen.

Platform Tested : Result OK

Android iOS macOS Web Linux Windows
✔ ✔ :x: :x: :x: :x:

Key Features

  • Easy to use: The package offers a straightforward implementation process, allowing you to integrate chat functionality seamlessly into your app.
  • Direct Integration: Firebase Firestore and Firebase Cloud are directly integrated, ensuring reliable and efficient communication between users.
  • Pre-Build UI: The package comes with a pre-built user interface for the chat screens, eliminating the need for extensive design work.
  • Start Chat with a Single Function: Initiating a chat is as simple as calling a single function, enabling users to connect and communicate quickly.
  • Customizable Themes: Both the Home Screen and Chat Screen can be customized to match your app's design and branding.

Gallery

Installation

To get started, add the following dependency to your pubspec.yaml file:

dependencies:
  apptex_chat: ^2.0.0

Then, run flutter pub get to install the package.

Usage

Step 1 : Firebase Configuration

  1. Install Firebase in your project
  2. Download google-services.json and GoogleService-Info.plist file for your project from firebase.
  3. Inilize firebase in the main function.

Step 2 : User Authentication

To enable chat functionality, you need to authenticate users. When a user signs up or logs in, you can pass their information to AppTexChat using the initChat method.

// Here you can set the current user to the Apptex chat
AppTexChat.instance.initChat(
 currentUser: ChatUserModel(
   uid: "{uid}",
   profileUrl: "{Profile url}",
   name: "{Currect User Name}",
   fcmToken: "{Fcm Token}", //Pass empty string if you don't have fcm token
 ),
);

Replace Current User Name, uid, profile URL, and Fcm Token with the corresponding values for the user.

Step 3 : Starting a Chat

To start a chat with another user, call the startNewConversationWith function:

//Here you need to pass the other user's info
AppTexChat.instance.startNewConversationWith(
  ChatUserModel(
    uid: "Other user uid",
    profileUrl: 'Other user profile',
    name: 'Other user name',
    fcmToken: 'Other user fcm token',
  ),
);

Show Conversations on Inbox Screen

To see a list of all the conversations, use the ConversationsScreen widget. It has a builder parameter which gives you the flexibility to list the conversation according to your app's design.

// Example 
ConversationsScreen(
  builder: (conversations, isLoading) => ListView.separated(
    separatorBuilder: (context, index) => SizedBox(height: 20),
    shrinkWrap: true,
    padding: EdgeInsets.symmetric(horizontal: 10, vertical: 10),
    itemCount: conversations.length,
    itemBuilder: (context, index) => Container(
      decoration: BoxDecoration(
        borderRadius: BorderRadius.circular(10),
        color: Colors.white,
        boxShadow: [
          BoxShadow(
            color: Colors.grey.withOpacity(0.5),
            spreadRadius: 1,
            blurRadius: 2,
            offset: Offset(0, 1),
          )
        ],
      ),
      padding: EdgeInsets.all(10),
      child: ListTile(
        onTap: () {
          //TODO: Navigate to chat screen
        },
        leading: CircleAvatar(
          backgroundImage:
              NetworkImage(conversations[index].otherUser.profileUrl ?? ''),
        ),
        title: Text(conversations[index].otherUser.name),
        subtitle: Text(conversations[index].lastMessage),
        trailing: Container(
          padding: EdgeInsets.all(5),
          decoration: BoxDecoration(
            color: Colors.blue,
            shape: BoxShape.circle,
          ),
          child: Text(
            conversations[index].unreadMessageCount.toString(),
            style: TextStyle(color: Colors.white),
          ),
        ),
      ),
    ),
  ),
);

Display messages of a specific chat

To see messages of a specific conversation, use the ChatScreen widget. It has an appBarBuilder(required) and bubbleBuilder(optional) parameter which gives you the flexibility to create custom appbar and chat bubbles according to your app's design.

ChatScreen(
 conversationModel: conversationModel, 
 showMicButton: false, //It is true by default, set it to false if you don't want voice messages
 appBarBuilder: ((currentUser, otherUser) => AppBar()), //Builder to create custom AppBar
);

Features Status

  1. Chating ✅
  2. Voice messages ✅
  3. Images ✅
  4. Emojis ✅
  5. Videos 🚫
  6. Document 🚫
  7. Location 🚫

Additional information

More is about to Come:

Features that will be added later:

  1. Push Notifications
  2. Make it for web

Frameworks Used

  1. Firebase Firestore
  2. Firebase Cloud storage

Contributors


Sayed Muhammad Idrees

💻 🎨

Shah Raza

💻

Jamshid Ali

💻

Afaq Zahir

💻

Help Maintenance

Buy Me A Coffee

カテゴリー

依存関係

ソースリポジトリ

このパッケージを使用しているプロジェクト

データはまだありません。