invokeMethodToWindow method
Invokes a method on the window with id targetWindowId
.
It could return a Future that resolves to the return value of the invoked method, otherwise null
.
Use WindowListener.onEventFromWindow to listen for the event.
Implementation
Future<dynamic> invokeMethodToWindow(int targetWindowId, String method,
[dynamic args]) async {
final Map<String, dynamic> arguments = {
'targetWindowId': targetWindowId,
'args': {
'fromWindowId': _id,
'eventName': kEventFromWindow,
'method': method,
'arguments': args,
},
};
return await _invokeMethod('invokeMethodToWindow', arguments);
}