ChalonaEvent<T extends Function> class
Manejador de eventos tipado que permite registrar y ejecutar listeners para un tipo específico de evento.
T es el tipo de dato que se pasará a los listeners cuando se dispare el evento.
Constructors
- ChalonaEvent({required String name})
Properties
Methods
-
add(
T listener) → dynamic Function() - Registra un nuevo listener y retorna una función para cancelar la suscripción
-
clear(
) → void - Elimina todos los listeners registrados y reinicia el contador
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
trigger(
[dynamic x]) → void - Dispara el evento, ejecutando todos los listeners registrados
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited