isDuplicateNotification method
Check if a notification with the same duplicate key exists
Implementation
@override
Future<bool> isDuplicateNotification(String duplicateKey, Duration? timeWindow) async {
try {
final result = await methodChannel.invokeMethod<bool>('isDuplicateNotification', {
'duplicateKey': duplicateKey,
'timeWindow': timeWindow?.inSeconds,
});
return result ?? false;
} on PlatformException catch (e) {
debugPrint('Error checking duplicate notification: ${e.message}');
return false;
}
}