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

Properties

baseUrl String
The base URL for the API requests.
no setteroverride
dio → Dio
The Dio instance used for making HTTP requests.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
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 the content from the specified URL as a Uint8List.
inherited
downloadFile(String url, {required String savePath, required String filename}) Future<File?>
Downloads the content from the specified URL and saves it 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"}) Future<File>
Uploads a file to the specified upload URL.
inherited
uploadFileFromFilePicker(PlatformFile file, {String uploadUrl = '/upload-file'}) Future<File>
Uploads a file from a PlatformFile object to the specified upload URL.
inherited
uploadFileFromImagePicker(XFile file, {String uploadUrl = '/upload-file'}) Future<File>
Uploads a file from an XFile object to the specified upload URL.
inherited
uploadFiles({required List<String> filePaths, String uploadUrl = '/multi-upload-file'}) Future<List<File>>
Uploads multiple files to the specified upload URL.
inherited
uploadFilesFromFilePicker(List<PlatformFile> files, {String uploadUrl = '/multi-upload-file'}) Future<List<File>>
Uploads multiple files from a list of PlatformFile objects to the specified upload URL.
inherited
uploadFilesFromImagePicker(List<XFile> files, {String uploadUrl = '/multi-upload-file'}) Future<List<File>>
Uploads multiple files from a list of XFile objects to the specified upload URL.
inherited

Operators

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