Skip to main content

Set default DND level

Set the default do not disturb level for a community channel by calling community.setNotificationLevel(). This default applies to all subchannels unless overridden by a subchannel-specific setting.

Set the default DND level

Dart
final community = CommunityChannel('<community-id>');
await community.setNotificationLevel(
NoDisturbLevel.blocked,
(error) {
if (error == null) {
print('Community DND level set');
}
},
);