setDoNotDisturb method Null safety
Sets do not disturb mode enable
with given start and end time.
Implementation
Future<void> setDoNotDisturb({
required bool enable,
int startHour = 0,
int startMin = 0,
int endHour = 23,
int endMin = 59,
String timezone = 'UTC',
}) async {
if (enable && startHour < 0 ||
startHour > 23 ||
startMin < 0 ||
startMin > 59 ||
endHour < 0 ||
endHour > 23 ||
endMin < 0 ||
endMin > 59) {
throw InvalidParameterError();
}
return _int.api.send(UserDoNotDisturbSetRequest(
enable: enable,
startHour: startHour,
startMin: startMin,
endHour: endHour,
endMin: endMin,
timezone: timezone,
));
}