Value<T> class

Represents an EventArgs 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 Values which supports 2 (generic) values.

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

Constructors

Value(T value)
Creates a Value representing one generic value

Properties

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

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