clear_all_notifications 0.0.2
clear_all_notifications: ^0.0.2 copied to clipboard

A Flutter plugin for clearing all Android and iOS active notifications

example/lib/main.dart

import 'package:flutter/material.dart';
import 'dart:async';

import 'package:flutter/services.dart';
import 'package:clear_all_notifications/clear_all_notifications.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {

  @override
  void initState() {
    super.initState();
    initClearNotificationsState();
  }

  Future<void> initClearNotificationsState() async {
    ClearAllNotifications.clear();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Clear all notifications plugin'),
        ),
        body: Center(
          child: Text('Simple plugin to clear all active notifications'),
        ),
      ),
    );
  }
}
2
likes
80
pub points
60%
popularity

A Flutter plugin for clearing all Android and iOS active notifications

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (LICENSE)

Dependencies

flutter

More

Packages that depend on clear_all_notifications