D8 hook_flag_flag not working.

Hello, I am working in one of the project using Flag module.

I want to add custom event when user flag any content. I am trying to use hook_flag_flag but it is not working.

I have added following uses in the module file for the flag.

use DrupalflagFlagInterface;
use DrupalflagEventFlagEvents;
use DrupalflagEventFlaggingEvent;

Is there anything to add more?

Can anyone help me on this issue?

Thanks in advance.
Ankit Hinglajia

Drupal version: 

Source: https://www.drupal.org/taxonomy/term/22/feed