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

events List<T>
Lista de todos los listeners activos
no setter
hashCode int
The hash code for this object.
no setterinherited
name String
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

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