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

套件詳情v0.1.1

ntfluttery

適用於 Flutter/Dart 的 ntfy.sh API 客戶端,用於取得、建立、更新和刪除通知。

AndroidiOSmacOSWindowsLinux
近 30 天下載
11
喜歡數
2
Pub 分數
80

安裝套件

flutter pub add ntfluttery

套件介紹

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

ntfluttery 是一個 Flutter/Dart 套件,提供對 ntfy.sh 通知服務的客戶端,讓應用程式能夠以程式設計方式發送、檢索、更新和刪除通知。它支援所有主要平台,包括 Android、iOS、macOS、Windows 和 Linux。該套件簡化了與 ntfy.sh 的 RESTful API 的整合,讓開發者能在其應用中傳遞即時警報和訊息。適用於輕量級、無伺服器的通知系統,設定簡單,並可在各種環境中順暢運作。

適用情境

  • 發送即時推播通知
  • 與 ntfy.sh 集成以進行警報
  • 在應用程式中自動傳送訊息
  • 跨平台通知處理
  • 建構輕量級警示系統

主要特色

  • 支援所有主要平台
  • 通知的完整 CRUD 操作
  • 簡單 API 結合
  • 輕量且高效
  • 即時訊息傳遞

適合對象

  • 使用 ntfy.sh 的開發者
  • 需要跨平台提醒的應用
  • 無伺服器通知工作流程
  • 快速整合專案
  • 極簡通知解決方案

使用建議

  • 需要一個 ntfy.sh 帳號
  • 依賴外部API的可用性
  • 僅限 ntfy.sh 功能
  • 無內建 UI 元件
  • 需要網絡連接

原始 README

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

ntfluttery

This plugin is focused on help with the integration of ntfy.sh it has multiple ways to access the list of messages such as a Streaming of data or even using custom credentials.

Also it provides various ways to handle the messages list.

Features

  • Ready to use NTFY:
  • Tuples of messages: Thanks to Dart 3, you can fetch customisable tuples based on the type of message.
  • Error Handling and Data Processing
  • Growing test percentage: The test percentage is being continously growing, to ensure a fully tested library.

Getting Started

Installation

To use this plugin, add ntfluttery as a dependency in your pubspec.yaml file.

dependencies:
  ntfluttery: ^latest_version
Usage
import 'package:ntfluttery/ntfluttery.dart';

void main() {
    // initialize the client
  final client = NtflutteryService(
      credentials:
          Credentials(username: 'ntfyUser', password: 'ntfyPassword'));

    // Inject a logger into each request.
    client.addLogging(true);

    // Fetch from the NTFY API as a STREAM
  final result = await cliente
      .get('https:/notification/$topic/json?poll=1');

    // Received the data as a touple ready to be used.
  result.$1.listen((event) {
    print(event.$1);
    print(event.$2);
  });
}
import 'package:ntfluttery/ntfluttery.dart';

void main() {
    // initialize the client
  final client = NtflutteryService(
      credentials:
          Credentials(username: 'ntfyUser', password: 'ntfyPassword'));

    // Or fetch the messages and instead of use a Streaming just use it as a simple Future value.
    final latest = await cliente.getLatestMessage(
      'https://notification/$topic/json?poll=1');
  print('latest: $latest');
}

Additional Information

  • Platform Support: iOS, Android, Web, Desktop
  • Dependencies: Dio, Flutter, PrettyDioLogger

Contributing

Contributions are welcome!

License

This project is licensed under the MIT License.

Special thanks

Thanks to Philipp C. Heckel for create this great tool.

Support and Contact

If you have any questions or issues, please file them on issue tracker.

For further inquiries, contact me at luisalfonsocb83@gmail.com.

所屬分類

依賴

依賴清單 3 項

原始碼儲存庫

使用此套件的專案

暫無相關資料。