cancelEvent method

  1. @override
bool cancelEvent(
  1. Object? event, {
  2. bool stopImmediatePropagation = false,
})
override

Implementation

@override
bool cancelEvent(Object? event, {bool stopImmediatePropagation = false}) {
  if (event is UIEvent) {
    if (event.cancelable!) {
      event.preventDefault();

      if (stopImmediatePropagation) {
        event.stopImmediatePropagation();
      }

      return true;
    }
  }

  return false;
}