notification/domain

Define Dart repository contracts and usecases for notification management in Flutter Clean Architecture.

Updated Apr 13, 2026
One-click install
npx skills add https://github.com/Vantoan252003/Mozi --skill notification-domain
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: notification/domain
Source: https://github.com/Vantoan252003/Mozi/tree/main/lib/features/notification/domain
Command: npx skills add https://github.com/Vantoan252003/Mozi --skill notification-domain

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides a clear domain-layer specification for handling notification entities, repository contracts, and usecases so teams can implement consistent, testable notification flows across a Flutter app.

Core Features & Use Cases

  • Repository Contracts: Defines repository methods such as getNotifications, markRead, markAllRead, getUnreadCount, and registerFcmToken to standardize data access.
  • Usecase Definitions: Encapsulates application actions (fetching notifications, marking read, counting unread, registering FCM tokens) as discrete usecases for easier testing and orchestration.
  • Use Case Example: In a ride-hailing app, use these domain definitions to fetch a user's latest notifications, mark specific notifications as read when opened, and register device tokens for push delivery.

Quick Start

Use the notification domain definitions to implement and wire repository interfaces and usecases for fetching notifications, marking them read, and registering the device FCM token.

Frequently Asked Questions about notification/domain

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure notification usecases in Flutter Clean Architecture?

Notification usecases in Flutter Clean Architecture encapsulate actions like fetching notifications and registering FCM tokens as discrete classes. This approach standardizes data access through repository contracts, making application logic easier to test and orchestrate independently.

What repository methods are needed for managing in-app notifications in Dart?

Managing in-app notifications in Dart requires repository contracts defining methods like getNotifications, markRead, markAllRead, getUnreadCount, and registerFcmToken to standardize data access and handle notification states.

How do I register FCM tokens using a domain layer in Flutter?

Register FCM tokens in a Flutter domain layer by implementing a specific usecase that exposes a registerFcmToken method. This usecase interacts with a defined repository contract to handle device token registration for push delivery with clear inputs and error handling.

Does this notification domain layer support tracking unread notification counts?

Yes, the notification domain layer supports tracking unread notification counts by defining a specific getUnreadCount usecase. This usecase queries the repository contract to retrieve and expose the current number of unread notifications.

When should I define repository contracts for notifications instead of direct API calls?

Define repository contracts for notifications when building scalable Flutter apps needing consistent, testable flows. This abstraction separates domain logic from data sources, allowing teams to implement standardized actions like marking read without coupling to specific APIs.