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

套件詳情v1.6.0

tdlib

TDLib 的 Flutter 插件。一個完整的 tdlib-tdjson 綁定套件。

近 30 天下載
250
喜歡數
65
Pub 分數
60

安裝套件

flutter pub add tdlib

套件介紹

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

一個 Flutter 插件,提供對 TDLib(Telegram 資料庫程式庫)的完整綁定,讓 Flutter 應用能使用原生 Telegram 功能。它透過 tdjson 提供對 Telegram 完整 API 的存取,讓開發者能夠建構具備使用者驗證、聊天管理、訊息傳送與媒體處理等功能的即時通訊應用。此套件專為與 Flutter 無縫整合而設計,支援 Android 與 iOS 平台。非常適合希望在應用中嵌入類似 Telegram 的聊天體驗,又無需從頭開發的開發者。

適用情境

  • 建構 Telegram 客戶端
  • 實現即時訊息傳遞
  • 建立基於聊天的應用程式
  • 整合 Telegram 登錄
  • 開發群組通訊工具

主要特色

  • 完整的 TDLib 結合
  • 跨平台支援
  • 透過 Telegram 進行驗證
  • 訊息發送和接收
  • 媒體文件處理

適合對象

  • 開發 Telegram 客戶端的開發者
  • 需要安全訊息傳遞的應用程式
  • 需要 Telegram API 存取權限的專案
  • 行動聊天應用開發者

使用建議

  • 需要理解 TDLib
  • 大型二進制檔案大小
  • 需要適當的狀態管理
  • 有限的文件
  • 需要平台特定的設定

原始 README

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

TDLib

Flutter Plugin for TDLib (Telegram Database Library) v1.8.15

Telegram Tdlib is a complete library for creating telegram clients, it also has a simple tdjson ready-to-use library to ease the integration with different programming languages and platforms.
This plugin is a complete tdlib-tdjson binding package to help you create your own Telegram clients.

See the example directory for the complete sample app.

Installation

Install the plugin by running the following command from the project root:

flutter pub add tdlib

Initialization

This plugin contains only Android tdlib-tdjson library. In case of other platforms usage you need to manually put the tdjson library in your project

  • for Windows:
  • for IOS and macOS support:
  • for web:
    • Copy all files in data/web-package to web folder in your project.
    • Point tdlib.js file in index.html:
      <!--add this between the <body> tags -->
      <script src="/tdlib.js" type="application/javascript"></script>
      

To initialize tdlib plugin, call the initialize method on the TdPlugin class.

Since this is an asynchronous operation, the main function can be modified to ensure initialization is complete before running the application.

The method accepts LIBTDJSON_PATH for windows platform or LIBTDJSON_NAME for IOS & macOS.

Import tdlib plugin:

import 'package:tdlib/tdlib.dart';

Next, within the main function, initialize TdPlugin:

// lib/main.dart

void main() async {
  await TdPlugin.initialize();
  runApp(MyApp());
}

Usage

Getting started with TDLib

所屬分類

依賴

依賴清單 2 項

  • ffi^2.1.0
  • js^0.6.7

原始碼儲存庫

使用此套件的專案

暫無相關資料。