onWindowScreenChanged method

void onWindowScreenChanged(
  1. String id,
  2. void callback(
    1. int screenIndex
    )
)

Called when a window moves to a different screen.

Implementation

void onWindowScreenChanged(String id, void Function(int screenIndex) callback) {
  onWindowEvent(id, 'screenChanged', (event) {
    callback(event.data['screenIndex'] as int);
  });
}