notify method

Future<void> notify(
  1. AtKey atKey,
  2. String value, {
  3. required bool checkForFinalDeliveryStatus,
  4. required bool waitForFinalDeliveryStatus,
  5. required Duration ttln,
})

Implementation

Future<void> notify(
  AtKey atKey,
  String value, {
  required bool checkForFinalDeliveryStatus,
  required bool waitForFinalDeliveryStatus,
  required Duration ttln,
}) async {
  await atClient.notificationService.notify(
    NotificationParams.forUpdate(atKey,
        value: value, notificationExpiry: ttln),
    checkForFinalDeliveryStatus: checkForFinalDeliveryStatus,
    waitForFinalDeliveryStatus: waitForFinalDeliveryStatus,
    onSuccess: (NotificationResult notification) {
      logger.info('SUCCESS:$notification with key: ${atKey.toString()}');
    },
    onError: (notification) {
      logger.info('ERROR:$notification');
    },
  );
}