setDoNotDisturb static method

Future<void> setDoNotDisturb(
  1. {required bool enable,
  2. int startHour = 0,
  3. int startMin = 0,
  4. int endHour = 23,
  5. int endMin = 59,
  6. String timezone = 'UTC'}
)

Sets Do-not-disturb option for the current User. If this option is enabled, the current User does not receive push notification during the specified time repeatedly. If you want to snooze specific period, use setSnoozePeriod.

Implementation

static Future<void> setDoNotDisturb({
  required bool enable,
  int startHour = 0,
  int startMin = 0,
  int endHour = 23,
  int endMin = 59,
  String timezone = 'UTC',
}) async {
  sbLog.i(StackTrace.current, 'enable: $enable');
  return await _instance._chat.setDoNotDisturb(
    enable: enable,
    startHour: startHour,
    startMin: startMin,
    endHour: endHour,
    endMin: endMin,
    timezone: timezone,
  );
}