clear_all_notifications 1.0.0 copy "clear_all_notifications: ^1.0.0" to clipboard
clear_all_notifications: ^1.0.0 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: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'),
        ),
      ),
    );
  }
}
13
likes
130
pub points
93%
popularity

Publisher

unverified uploader

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