Hecatoncheir / notification_center

Notification center plugin.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

License:MIT License


Languages

Language:Dart 100.0%