Search packages, repositories and app categories

Package detailsv0.1.1

ntfluttery

ntfy.sh API client for Flutter/Dart, fetch, create, update, delete notifications.

AndroidiOSmacOSWindowsLinux
30-day downloads
11
Likes
2
Pub points
80

Install package

flutter pub add ntfluttery

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

ntfluttery is a Flutter/Dart package that provides a client for the ntfy.sh notification service, enabling apps to send, retrieve, update, and delete notifications programmatically. It supports all major platforms including Android, iOS, macOS, Windows, and Linux. The package simplifies integration with ntfy.sh's RESTful API, allowing developers to deliver real-time alerts and messages within their applications. Ideal for lightweight, serverless notification systems, it requires minimal setup and works seamlessly across environments.

Use cases

  • Sending real-time push notifications
  • Integrating with ntfy.sh for alerting
  • Automating message delivery in apps
  • Cross-platform notification handling
  • Building lightweight alert systems

Key features

  • Supports all major platforms
  • Full CRUD operations for notifications
  • Simple API integration
  • Lightweight and efficient
  • Real-time message delivery

Suitable for

  • Developers using ntfy.sh
  • Apps needing cross-platform alerts
  • Serverless notification workflows
  • Quick integration projects
  • Minimalist notification solutions

Considerations

  • Requires an ntfy.sh account
  • Dependent on external API availability
  • Limited to ntfy.sh functionality
  • No built-in UI components
  • Network connectivity required

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

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.

Categories

Dependencies

Dependency list 3 items

Source repository

Projects using this package

No data available yet.