clear_notification_tray 0.0.3 copy "clear_notification_tray: ^0.0.3" to clipboard
clear_notification_tray: ^0.0.3 copied to clipboard

A plugin to clear notification tray in both android and iOS and reset the iOS badge count.

example/lib/main.dart

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

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

class MyApp extends StatefulWidget {
  const MyApp({super.key});

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example for clearing notifications'),
        ),
        body: Center(
          child: ElevatedButton(
            onPressed: () => ClearNotificationTray.clear(),
            child: const Text(
              'Clear All Notifications',
            ),
          ),
        ),
      ),
    );
  }
}
3
likes
150
points
194
downloads

Publisher

unverified uploader

Weekly Downloads

A plugin to clear notification tray in both android and iOS and reset the iOS badge count.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on clear_notification_tray