example/lib/main.dart
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,