isDndEnabled method

Future<bool> isDndEnabled()

Returns true if DND is enabled. Returns false if the platform is iOS, otherwise returns the DND status.

Implementation

Future<bool> isDndEnabled() async {
  if (Platform.isIOS) {
    return false;
  }
  final dndStatus = await getDNDStatus();
  return dndStatus != InterruptionFilter.all;
}