scheduleNotification method

  1. @override
Future<bool> scheduleNotification(
  1. dynamic scheduledNotification
)
override

Schedule a notification

Implementation

@override
Future<bool> scheduleNotification(dynamic scheduledNotification) async {
  try {
    final Map<String, dynamic> notificationData = scheduledNotification.toJson();
    final result = await methodChannel.invokeMethod<bool>('scheduleNotification', notificationData);
    return result ?? false;
  } on PlatformException catch (e) {
    debugPrint('Error scheduling notification: ${e.message}');
    return false;
  }
}