sirenapp_flutter_inbox
is a comprehensive and customizable Flutter UI kit for displaying and managing notifications. This documentation provides comprehensive information on how to install, configure, and use the SDK effectively.
sirenapp_flutter_inbox
package:
pubspec.yaml
filesirenapp_flutter_inbox
to your dependencies:Add sirenapp_flutter_inbox
to your dependencies:flutter pub get
in your terminal to install the packageArgument | Description | Type | Default |
---|---|---|---|
darkMode | Enable dark mode when custom theme is not provided | bool | false |
disabled | Disable click on icon | bool | false |
hideBadge | Hide unviewed count badge | bool | false |
notificationIcon | Custom notification icon | Widget | null |
onError | Error callback | Function(SirenErrorType) | null |
onTap | Custom tap handler | VoidCallback | null |
theme | Theme properties | CustomThemeColors | null |
customStyles | Style properties | CustomStyles | null |
SirenInbox
widget provides a paginated list view for displaying notifications.
Argument | Description | Type | Default |
---|---|---|---|
darkMode | Enable dark mode | bool | false |
hideTab | Show/hide All/Unread tabs | bool | false |
itemsPerFetch | Notifications per request (max 50) | int | 20 |
listEmptyWidget | Custom empty state widget | Widget | null |
customCard | Custom card builder | Widget Function(NotificationType) | null |
customLoader | Custom loading widget | Widget | null |
customErrorWidget | Custom error widget | Widget | null |
cardParams | Card properties | CardParams | See below |
headerParams | Header properties | HeaderParams | See below |
tabParams | Tab bar properties | TabParams | See below |
onCardClick | Card tap handler | Function(NotificationType) | null |
onError | Error callback | Function(SirenErrorType) | null |
theme | Theme properties | CustomThemeColors | null |
customStyles | Style properties | CustomStyles | null |
customTabIndicator | Tab indicator decoration | BoxDecoration | null |
filterParams | Filter configuration | FilterParams | See below |
Siren
class provides utility functions for managing notifications:
Function | Arguments | Type | Description |
---|---|---|---|
markAsReadByDate | startDate: String | String | Sets notifications as read until the given date |
markAsReadById | id: String | String | Marks a specific notification as read |
deleteById | id: String | String | Deletes a specific notification |
deleteByDate | startDate: String | String | Deletes notifications until the given date |
markAllAsViewed | startDate: String | String | Marks all notifications as viewed until the given date |