onMoved method

void onMoved(
  1. String id,
  2. void callback(
    1. Offset position
    )
)

Called when window moves.

Implementation

void onMoved(String id, void Function(Offset position) callback) {
  onWindowEvent(id, 'moved', (event) {
    callback(Offset(
      (event.data['x'] as num).toDouble(),
      (event.data['y'] as num).toDouble(),
    ));
  });
}