dismiss static method
Hides a shown notification.
context
is required, this is used to get internally used notification controller class which is subclass of InheritedWidget
.
This method will awaits an animation that showing the notification.
Implementation
static FutureOr<void> dismiss({required BuildContext context}) async {
final controller = _NotificationController.of(context);
if (controller == null) return;
await controller.dismissProgramatically();
}