onClick method

WidgetElementVisible onClick(
  1. dynamic fun(
    1. Element,
    2. Event
    )?
)
inherited

An element receives a click event when a pointing device button (such as a mouse's primary mouse button) is both pressed and released while the pointer is located inside the element. Read more...

Implementation

WidgetElementVisible onClick(Function(Element, Event)? fun) {
  if (fun != null) on.call('click', fun);
  return this;
}