jqEventListener static method
Build a jQuery event listener
selector
is the selector of the element to listen to. The selector should be a
jQuery selector without the paranthesis and the jQuery sign.
event
is the javascript event to listen to.
args
are the parameters accepted by the closure.
body
is the code that will be executed when the event is triggered.
Implementation
static String jqEventListener({
required String selector,
required String event,
List<String> args = const [],
required String body,
}) =>
"\$($selector).on('$event', ${callbackClosure(args: args, body: body)});";