v0.1.4+1
flutter_dnd
Um plugin Flutter para gerenciar as configurações de Não Perturbe no Android.
27Curtidas 17Downloads em 30 dias160Pontos Pub
Android
Um plugin Flutter para gerenciar as configurações de Não Perturbe no Android.
Texto original em inglês. Visite o GitHub para a versão atual.
A Flutter plugin to manage Do Not Disturb settings on Android.
To use this plugin, add flutter_dnd as a dependency in your pubspec.yaml file.
Make sure you add the following permissions to your Android Manifest
<uses-permission android:name="android.permission.ACCESS_NOTIFICATION_POLICY"/>
// Import package
import 'package:flutter_dnd/flutter_dnd.dart';
if (await FlutterDnd.isNotificationPolicyAccessGranted) {
await FlutterDnd.setInterruptionFilter(FlutterDnd.INTERRUPTION_FILTER_NONE); // Turn on DND - All notifications are suppressed.
} else {
FlutterDnd.gotoPolicySettings();
}
| Filter | Description |
|---|---|
| INTERRUPTION_FILTER_ALL | No notifications are suppressed. |
| INTERRUPTION_FILTER_PRIORITY | Allow priority notifications. |
| INTERRUPTION_FILTER_NONE | Suppress all notifications. |
| INTERRUPTION_FILTER_ALARMS | Allow alarm notifications. |
Lista de dependências 2 itens
{"sdk":"flutter"}{"sdk":"flutter"}Filtre pelo caso de uso, compare a atividade e confira o projeto original antes de adotá-lo.
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗