8000 GitHub - Hecatoncheir/notification_center: Notification center plugin.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Hecatoncheir/notification_center

Repository files navigation

notification_center

pipeline status coverage report

Notifications

Notifications preview gif

Example

example/lib/main.dart

How to use

Add NotificationCenter widget:

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      home: Scaffold(
        body: NotificationCenter(
          child: ExampleWidget(),
        ),
      ),
    );
  }

Now notifications can be send:

  @override
  void initState() {
    super.initState();
    
    final infoNotification = Info(
      headerText: "Info notification header",
      bodyText: "Info notification body",
      constraints: BoxConstraints(maxWidth: 260),
      notificationBuilder: notificationFadeAnimationBuilder,
    );
    
    NotificationCenter.of(context).showNotification(infoNotification);
  }

Animations:

notificationFadeAnimationBuilder,
notificationOneByOneAnimationBuilder,

BLoC events:

GetAllNotifications,
ShowAllNotifications,
HideAllNotifications,
ShowNotification,
HideNotification,
NotificationDeleted,

About

Notification center plugin.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

0