API Reference 0.7.1rikulo_eventLayoutEvent

LayoutEvent class

A layout event. It is sent with ViewEvents.layout and ViewEvents.preLayout.

class LayoutEvent extends ViewEvent {
 final MeasureContext _context;
 LayoutEvent(MeasureContext context, [String type="layout", View target]):
 super(type, target), _context = context;

 /** Returns the context.
  */
 MeasureContext get context => _context;

 String toString() => "LayoutEvent($target)";
}

Extends

ViewEvent > LayoutEvent

Constructors

new LayoutEvent(MeasureContext context, [String type = "layout", 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
LayoutEvent(MeasureContext context, [String type="layout", View target]):
super(type, target), _context = context;

Properties

final MeasureContext context #

Returns the context.

MeasureContext get context => _context;

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;

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() => "LayoutEvent($target)";