API Reference 0.7.1rikulo_eventChangeEvent<T>

ChangeEvent<T> class

An event to indicate a view's value has been changed. It is sent with ViewEvents.change.

class ChangeEvent<T> extends ViewEvent {
 final T _value;
 ChangeEvent(T value, [String type="change", View target]):
 super(type, target), _value = value;

 /** Returns the value.
  */
 T get value => _value;

 String toString() => "ChangeEvent($target,$value)";
}

Extends

ViewEvent > ChangeEvent<T>

Constructors

new ChangeEvent(T value, [String type = "change", View target]) #

Constructor.

  • type is the event type, such as click.
  • target is the view that this event is targeting. If not specified, it will be assigned automatically when the sendEvent method is called.

docs inherited from ViewEvent
ChangeEvent(T value, [String type="change", View target]):
super(type, target), _value = value;

Properties

View currentTarget #

inherited from ViewEvent

The view that is handling this event currently.

View currentTarget

final bool isPropagationStopped #

inherited from ViewEvent

Returns whether this event's propagation is stopped.

Default: false.

It becomes true if stopPropagation is called, and then all remaining event listeners are ignored.

bool get isPropagationStopped => _propStop;

View target #

inherited from ViewEvent

Returns the view that this event is targeting to.

View target

final int timeStamp #

inherited from ViewEvent

Returns the time stamp.

int get timeStamp => _stamp;

final String type #

inherited from ViewEvent

Returns the event's type.

String get type => _type;

final T value #

Returns the value.

T get value => _value;

Methods

void preventDefault() #

inherited from ViewEvent

Prevents the browser's default behavior.

void preventDefault() {
}

void stopPropagation() #

inherited from ViewEvent

Stops the propagation. Once called, all remaining event listeners, if any, are ignored.

void stopPropagation() {
 _propStop = true;
}

String toString() #

Returns a string representation of this object.

docs inherited from Object
String toString() => "ChangeEvent($target,$value)";