NotificationService class

Clase NotificationService encargada de manejar las notificaciones locales en la aplicación, incluyendo la inicialización, solicitud de permisos, y la creación de notificaciones tanto simples como programadas.

Esta clase proporciona métodos para gestionar las notificaciones en plataformas Android e iOS, solicitando los permisos necesarios y mostrando notificaciones.

Métodos principales:

  • initNotification: Inicializa las notificaciones en la aplicación.
  • requestNotificationPermissions: Solicita permisos de notificación.
  • checkNotificationPermissions: Verifica si los permisos de notificación están activados.
  • showNotification: Muestra una notificación simple.
  • showNotificationSchedule: Muestra una notificación programada en una fecha específica.

Constructors

NotificationService()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

flutterLocalNotificationsPlugin FlutterLocalNotificationsPlugin
final

Static Methods

checkNotificationPermissions() Future<bool>
Método para verificar si los permisos de notificación están activos.
initNotification() Future<bool>
Método para inicializar las notificaciones locales.
requestNotificationPermissions() Future<bool>
Método para solicitar permisos de notificación.
showNotification({required BuildContext context, required int id, required String titleKey, required String bodyKey}) Future<void>
Método para mostrar una notificación simple.
showNotificationSchedule(BuildContext context, int id, String title, DateTime scheduleDate) Future<void>
Método para mostrar una notificación programada.