on method
Generic event handler for custom or less common events.
Use specific handlers (onClick, onInput, etc.) when available. Use this for events not covered by the standard handlers.
Example:
Div().on('customevent', handleCustom)
Implementation
ElementBuilder on(String event, EventCallback handler) {
// Normalize event name to camelCase with 'on' prefix
final eventName = event.startsWith('on')
? event
: 'on${event[0].toUpperCase()}${event.substring(1)}';
_attrs[eventName] = EventAttribute.fromContext(handler);
return this;
}