dispatch method

void dispatch(
  1. BuildContext context,
  2. SlidableController controller
)

Start bubbling this notification at the given build context.

The notification will be delivered to the closest SlidableNotificationListener widget. If the BuildContext is null, the notification is not dispatched.

Implementation

void dispatch(BuildContext context, SlidableController controller) {
  final scope = context
      .getElementForInheritedWidgetOfExactType<
          _SlidableNotificationListenerScope>()
      ?.widget as _SlidableNotificationListenerScope?;

  scope?.state.acceptNotification(controller, this);
}