搜索插件、代码仓与 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 项

源码仓库

使用此插件的项目

暂无相关数据。