UtilsNotificationRepository class

A repository class for managing user notifications.

This class extends BaseRepository and provides methods for handling various notification tasks such as creating and deleting notification tokens, listing read and unread notifications, counting read and unread notifications, and marking notifications as read.

Inheritance

Constructors

UtilsNotificationRepository.new({bool shouldUseDeviceInfo = true, bool shouldUsePersistentUrl = false})

Properties

baseUrl String
The base URL for API requests.
no setteroverride
cookieStorage CookieManager
no setterinherited
dio → Dio
finalinherited
hashCode int
The hash code for this object.
no setterinherited
persistentStorage PersistentStorage
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
secureStorage SecureStorage
no setterinherited

Methods

approve(UserNotification entity) Future<UserNotification>
Approves an entity based on the entity object.
inherited
approveById(num id) Future<UserNotification>
Approves an entity based on its ID.
inherited
count(UserNotificationFilter filter) Future<int>
Counts entities based on the provided filter.
inherited
countRead(UserNotificationFilter filter) Future<int>
Counts read notifications based on the provided filter.
countUnread(UserNotificationFilter filter) Future<int>
Counts unread notifications based on the provided filter.
create(UserNotification entity) Future<UserNotification>
Creates a new entity.
inherited
createToken(DeviceNotificationToken deviceNotificationToken) Future<bool>
Creates a notification token for the device.
deleteByEntity(UserNotification entity) Future<UserNotification>
Deletes an entity based on the entity object.
inherited
deleteById(num id) Future<UserNotification>
Deletes an entity based on its ID.
inherited
deleteToken(DeviceNotificationToken deviceNotificationToken) Future<bool>
Deletes a notification token for the device.
downloadBytes(String url) Future<Uint8List>
Downloads content as bytes from a URL.
inherited
downloadFile({required String url, required String savePath, required String filename}) Future<File?>
Downloads content to a file.
inherited
getById(num id) Future<UserNotification>
Retrieves an entity by its ID.
inherited
list(UserNotificationFilter filter) Future<List<UserNotification>>
Lists entities based on the provided filter.
inherited
listRead(UserNotificationFilter filter) Future<List<UserNotification>>
Lists read notifications based on the provided filter.
listUnread(UserNotificationFilter filter) Future<List<UserNotification>>
Lists unread notifications based on the provided filter.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
read(UserNotification userNotification) Future<String>
Marks a notification as read.
readAll() Future<void>
Marks all notifications as read.
reject(UserNotification entity) Future<UserNotification>
Rejects an entity based on the entity object.
inherited
rejectById(num id) Future<UserNotification>
Rejects an entity based on its ID.
inherited
toString() String
A string representation of this object.
inherited
update(UserNotification entity) Future<UserNotification>
Updates an existing entity.
inherited
uploadFile({required String filePath, String uploadUrl = "/upload-file", String? filename}) Future<File>
Uploads a single file.
inherited
uploadFileFromFilePicker(PlatformFile file, {String uploadUrl = "/upload-file"}) Future<File>
Uploads a file using PlatformFile.
inherited
uploadFileFromImagePicker(XFile file, {String uploadUrl = "/upload-file"}) Future<File>
Uploads a file using XFile.
inherited
uploadFiles({required List<String> filePaths, String uploadUrl = "/multi-upload-file"}) Future<List<File>>
Uploads multiple files.
inherited
uploadFilesFromFilePicker(List<PlatformFile> files, {String uploadUrl = "/multi-upload-file"}) Future<List<File>>
Uploads multiple files using PlatformFile.
inherited
uploadFilesFromImagePicker(List<XFile> files, {String uploadUrl = "/multi-upload-file"}) Future<List<File>>
Uploads multiple files using XFile.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited