diff --git a/src/EventSubscriber/FlagForListSubscriber.php b/src/EventSubscriber/FlagForListSubscriber.php
index f269efe..159455e 100644
--- a/src/EventSubscriber/FlagForListSubscriber.php
+++ b/src/EventSubscriber/FlagForListSubscriber.php
@@ -2,7 +2,8 @@
 
 namespace Drupal\flag_lists\EventSubscriber;
 
-use Symfony\Component\EventDispatcher\Event;
+use Drupal\flag\Event\FlaggingEvent;
+use Drupal\flag\Event\UnflaggingEvent;
 use Symfony\Component\EventDispatcher\EventSubscriberInterface;
 use Drupal\Core\Messenger\MessengerTrait;
 use Drupal\flag\Event\FlagEvents;
@@ -32,10 +33,10 @@ class FlagForListSubscriber implements EventSubscriberInterface {
   /**
    * This is called whenever the flag.entity_flagged event is dispatched.
    *
-   * @param Symfony\Component\EventDispatcher\Event $flag_event
+   * @param \Drupal\flag\Event\FlaggingEvent $flag_event
    *   The response event.
    */
-  public function flagListsEntityFlagged(Event $flag_event) {
+  public function flagListsEntityFlagged(FlaggingEvent $flag_event) {
 
     $flagId = $flag_event->getFlagging()->getFlagId();
 
@@ -51,10 +52,10 @@ class FlagForListSubscriber implements EventSubscriberInterface {
   /**
    * This is called whenever the flag.entity_unflagged event is dispatched.
    *
-   * @param Symfony\Component\EventDispatcher\Event $flag_events
+   * @param \Drupal\flag\Event\UnflaggingEvent $flag_events
    *   The response events.
    */
-  public function flagListsEntityUnflagged(Event $flag_events) {
+  public function flagListsEntityUnflagged(UnflaggingEvent $flag_events) {
     foreach ($flag_events->getFlaggings() as $flagging) {
 
       $flagId = $flagging->getFlagId();
