搜尋套件、儲存庫與 APP 分類

firebase_chat 封面
套件詳情v0.0.6+1

firebase_chat

功能完整的 Cloud Firestore 套件,可讓您更容易在應用程式中實作聊天功能

近 30 天下載
16
喜歡數
32
Pub 分數
50

安裝套件

flutter pub add firebase_chat

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

一個功能完整的 Flutter 套件,可簡化使用 Cloud Firestore 實現聊天功能。它提供即用型元件與實用工具,以最少的設定即可管理即時訊息傳遞、訊息持久化與使用者在線狀態。專為與 Firebase 無縫整合而設計,可處理常見的聊天模式,如訊息傳送、接收、輸入指示器與已讀回執。適合希望快速為應用加入強大聊天功能而無需撰寫樣板程式碼的開發者。

適用情境

  • 即時訊息應用
  • 客戶支援聊天介面
  • 團隊協作工具
  • 應用內訊息系統
  • 社交網絡應用

主要特色

  • 預建構的聊天 UI 元件
  • 即時訊息同步
  • 輸入指示器和已讀回執
  • 使用 Cloud Firestore 的訊息持久化
  • 與 Firebase 身份驗證輕鬆整合

適合對象

  • 開發聊天功能應用的開發者
  • 需要快速聊天實現的初創企業
  • 需要即時通訊的應用程式
  • 基於 Firebase 的專案
  • 原型設計聊天功能

使用建議

  • 需要 Firebase Cloud Firestore 設定
  • 在不修改原始碼的情況下,自訂功能有限
  • 依賴 Firebase 身份驗證
  • 未針對大規模群聊進行優化
  • 無內建媒體上傳支援

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

Firebase Chat🔥💬

⛏️ Getting started

To get started with Firebase, please see the documentation available at https://firebase.flutter.dev/docs/overview

Add Firebase Chat to your project by following the instructions on the install page and start using it:

import 'package:firebase_chat/firebase_chat.dart';

📱 Example

Extend your StatefulWidget
class ChatPage extends BaseChat {
  ChatPage({
    @required ChatEntity entity,
  }) : super(entity);

  @override
  _ChatPageState createState() => _ChatPageState();
}

class _ChatPageState extends BaseChatState<ChatPage> {
...
Override Methods and Properties

You can checkout example file

Widget inputBuilder(BuildContext context, ChatInputState state);
Future editAndUpload(Uint8List data);
Future getImage();

Widget get emptyWidget;
Widget get errorWidget;
Widget get loadingWidget;
Color  get primaryColor;
Color  get secondaryColor;

Models 📦

Peer User 👨
Fields
  • id - user Id
  • image - user image url
  • name - user display name
Constructors
  • PeerUser({this.id, this.image, this.name})
  • PeerUser.fromSnapshot(DocumentSnapshot snap)
Chat Entity 📩
Fields
  • mainUser - logged in user
  • peers - Map of users <user ID, PeerUser>
  • lastMessage - last sent message
  • title - name of the chat (You can name group chats, can be nullable)

License ⚖️

Issues and feedback 💭

If you have any suggestion for including a feature or if something doesn't work, feel free to open a Github issue for us to have a discussion on it.

所屬分類

依賴

依賴清單 10 項

原始碼儲存庫

使用此套件的專案

暫無相關資料。