addEvent method

void addEvent(
  1. OnEvent onEvent, {
  2. bool runAfter = false,
  3. bool runBefore = false,
})

adds event that will be called when a file creates an event

Implementation

void addEvent(
  OnEvent onEvent, {
  bool runAfter = false,
  bool runBefore = false,
}) {
  if (runAfter) {
    _afterEvents.add(onEvent);
  } else if (runBefore) {
    _beforeEvents.add(onEvent);
  } else {
    _events.add(onEvent);
  }
}