Zeba Academy Smart Notification Hub

pub package Flutter

A lightweight, AI-powered Flutter notification toolkit for sending smart notifications with predictive timing, in-app widgets, digest summaries, content suggestions, and cross-platform push sync — all offline-first and no-bloat.


✨ Features

  • Predict Best Notification Time: AI-based heuristic predicts optimal send times based on user activity.
  • In-App Notification Widgets: Pre-built notification cards, buttons, sliders, and quick actions.
  • Notification Summaries: Group multiple messages into a digest.
  • AI Content Suggestions: Generate engaging notification messages automatically.
  • Cross-Platform Push Notification Sync: Sync device tokens for Android, iOS, and Web.
  • 100% Offline & API-Free: No external services required for core functionality.

šŸ“¦ Installation

Add this package to your pubspec.yaml:

dependencies:
  zeba_academy_notification_hub: ^1.0.0

Then run:

flutter pub get

šŸš€ Quick Start

1ļøāƒ£ Import the package

import 'package:zeba_academy_notification_hub/zeba_academy_notification_hub.dart';

2ļøāƒ£ Add a notification

NotificationHub.add(NotificationItem(
  id: '1',
  title: 'Welcome!',
  message: NotificationContentSuggester.generate(),
  timestamp: DateTime.now(),
));

3ļøāƒ£ Show an in-app notification widget

InAppNotification(
  title: "New Alert",
  message: NotificationContentSuggester.generate(),
)

4ļøāƒ£ Generate notification digest

String digest = NotificationSummary.generateDigest(NotificationHub.getAll());
print(digest); // e.g., "You have 3 new notifications."

5ļøāƒ£ Sync push token to backend

await PushSyncHelper.syncToken(
  token: "DEVICE_PUSH_TOKEN",
  serverUrl: "https://your-backend.com/api/save-token",
);

šŸ“‚ Example

Check the example folder for a full working demo:

example/lib/main.dart

⚔ Notes

  • Works with Android, iOS, Web, and Desktop.
  • Fully customizable widgets and content templates.
  • Compatible with Firebase, OneSignal, or any custom push backend.

About Me

✨ I’m Sufyan bin Uzayr, an open-source developer passionate about building and sharing meaningful projects. You can learn more about me and my work at sufyanism.com or connect with me on LinkedIn.


Your all-in-one no-bloat hub!

šŸš€ Explore cutting-edge resources in coding, tech, and development at zeba.academy and code.zeba.academy. Empower yourself with practical skills through curated directives, real-world projects, and hands-on experience. Level up your tech game today! šŸ’»āœØ

Zeba Academy is a learning platform dedicated to coding, technology, and development.

āž” Visit our main site: zeba.academy āž” Explore hands-on courses and resources at: code.zeba.academy āž” Check out our YouTube tutorials: zeba.academy āž” Follow us on Instagram: zeba.academy

Thank you for visiting!


šŸ“„ License

This project is licensed under the GPL-3.0 License.

GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007