GenericEventArgs1<T> class

Represents a StdEventArgs derived class with one (generic) value.

For use as a quick alternative to defining your own custom EventArgs class. Provides a value field that contains the value supplied on creation.

See also GenericEventArgs2 which supports 2 (generic) values.

// example declaration with an inferred type
var e = Event<GenericEventArgs1>();
// example declaration with an declared type
var e = Event<GenericEventArgs1<String>>();
e.subscribe((args) => print(args.value));
e.broadcast(GenericEventArgs1('hello'));
// outputs: hello
Inheritance

Constructors

GenericEventArgs1(T value, {String description = ''})
Creates an EventArg1 with one generic value

Properties

description String
An optional description or other information.
getter/setter pairinherited
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value ↔ T
A generic value.
getter/setter pair
whenOccurred DateTime
The date and time the Event was broadcast.
getter/setter pairinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited