Skip to content
pubscout

do_not_disturb

1.0.3, released 2 years ago by an unverified publisher

A Flutter plugin for managing Do Not Disturb settings on Android devices.

$ flutter pub add do_not_disturb
Source repository

What it does

Allows Flutter apps to check if Do Not Disturb (Zen mode) is enabled, read detailed interruption filter statuses, open DND settings screens, and programmatically set DND modes on Android devices.

AI-written summary of version 1.0.3, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to detect if Do Not Disturb is active on Android.
  • Your app needs to programmatically control or modify DND interruption filters.
  • You want to direct users to system settings for notification policy access.

Skip it when

  • You are targeting platforms other than Android and iOS (note that iOS support is limited and ignores configuration calls).
  • You do not need to interact with system notification policies.

Strengths

  • Clean, enum-based API for handling interruption filter states.
  • Simple integration with no mandatory permissions for basic read-only status checks.

Weaknesses

  • Primarily limited to Android functionality.
  • Modifying DND mode requires special user permission and manifest configuration.

Setup

Kind
Plugin (native code)
Effort
Low
Code generation
No
Direct dependencies
1

For basic read status, no configuration is needed. To set DND mode, add the ACCESS_NOTIFICATION_POLICY permission to AndroidManifest.xml and request notification access from the user.

final dndPlugin = DoNotDisturbPlugin();
bool isDndEnabled = await dndPlugin.isDndEnabled();
InterruptionFilter status = await dndPlugin.getDNDStatus();

Alternatives

Packages that do the same job and could replace do_not_disturb.

Works with

Packages commonly used together with do_not_disturb: ones it builds on, ones built on it, and its own family.