quick_notify 0.2.1 copy "quick_notify: ^0.2.1" to clipboard
quick_notify: ^0.2.1 copied to clipboard

A cross-platform (Android/iOS/Web/Windows/macOS/Linux) notification plugin for Flutter.

example/lib/main.dart

import 'package:flutter/material.dart';

import 'package:quick_notify/quick_notify.dart';

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

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

class _MyAppState extends State<MyApp> {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Column(
          children: [
            Row(
              mainAxisAlignment: MainAxisAlignment.spaceEvenly,
              children: [
                ElevatedButton(
                  child: Text('hasPermission'),
                  onPressed: () async {
                    var hasPermission = await QuickNotify.hasPermission();
                    print('hasPermission $hasPermission');
                  },
                ),
                ElevatedButton(
                  child: Text('requestPermission'),
                  onPressed: () async {
                    var requestPermission = await QuickNotify.requestPermission();
                    print('requestPermission $requestPermission');
                  },
                ),
              ],
            ),
            ElevatedButton(
              child: Text('notify'),
              onPressed: () {
                QuickNotify.notify(
                  title: 'My title',
                  content: 'My content',
                );
              },
            ),
          ],
        ),
      ),
    );
  }
}
48
likes
140
pub points
78%
popularity

Publisher

verified publisherwoodemi.com

A cross-platform (Android/iOS/Web/Windows/macOS/Linux) notification plugin for Flutter.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter, flutter_web_plugins, plugin_platform_interface

More

Packages that depend on quick_notify