notification_shade 1.0.0 copy "notification_shade: ^1.0.0" to clipboard
notification_shade: ^1.0.0 copied to clipboard

A plugin to open and close the notification shade on android.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:notification_shade/notification_shade.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('Notifiaction Shade'),
        ),
        body: Center(
          child: RaisedButton(
            child: Text('Do the notification shade thing'),
            onPressed: () async {
              // Open the notification shade.
              NotificationShade.openNotificationShade;
              // Wait 2 seconds.
              await Future.delayed(Duration(seconds: 2));
              // And close it again.
              NotificationShade.closeNotificationShade;
            },
          ),
        ),
      ),
    );
  }
}
5
likes
40
pub points
42%
popularity

Publisher

unverified uploader

A plugin to open and close the notification shade on android.

Homepage
Repository (GitHub)
View/report issues

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on notification_shade