ZoneInBoundsMsg class

Message sent when a zone is within bounds of a mouse event.

This message is sent by ZoneManager.anyInBoundsAndUpdate or ZoneManager.anyInBounds for each zone that contains the mouse position.

Example

@override
(Model, Cmd?) update(Msg msg) {
  return switch (msg) {
    ZoneInBoundsMsg(:final zone, :final event)
        when zone.id == 'my-button' && event.action == MouseAction.release =>
      (handleClick(), null),
    _ => (this, null),
  };
}
Inheritance

Constructors

ZoneInBoundsMsg({required ZoneInfo zone, required MouseMsg event})
Creates a zone in bounds message.
const

Properties

dropWhenInputQueued bool
Whether this message can be dropped when fresher user input is queued.
no setterinherited
event MouseMsg
The mouse event that triggered this message.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
zone ZoneInfo
The zone that is in bounds.
final

Methods

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

Operators

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